mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* elf.c (_bfd_elf_write_object_contents): Check for non-NULL
elf_shstrtab. * format.c (bfd_check_format_matches): Set output_has_begun for both_direction. * section.c (bfd_set_section_contents): Use bfd_write_p. Remove special case for both_direction.
This commit is contained in:
@@ -1346,22 +1346,10 @@ bfd_set_section_contents (bfd *abfd,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (abfd->direction)
|
||||
if (!bfd_write_p (abfd))
|
||||
{
|
||||
case read_direction:
|
||||
case no_direction:
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
|
||||
case write_direction:
|
||||
break;
|
||||
|
||||
case both_direction:
|
||||
/* File is opened for update. `output_has_begun' some time ago when
|
||||
the file was created. Do not recompute sections sizes or alignments
|
||||
in _bfd_set_section_content. */
|
||||
abfd->output_has_begun = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Record a copy of the data in memory if desired. */
|
||||
|
||||
Reference in New Issue
Block a user