aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2005-05-17 19:44:55 +0000
committerDaniel Jacobowitz <drow@false.org>2005-05-17 19:44:55 +0000
commit26ae6d5ed03b3e749598b33ffd0aaefbaf9a6d7d (patch)
treea2a86631e13f89e100ac36db20db4170c9610924 /bfd/elf.c
parent970c3dbce892feccbd6334ebc431a82b84934efd (diff)
downloadgdb-26ae6d5ed03b3e749598b33ffd0aaefbaf9a6d7d.zip
gdb-26ae6d5ed03b3e749598b33ffd0aaefbaf9a6d7d.tar.gz
gdb-26ae6d5ed03b3e749598b33ffd0aaefbaf9a6d7d.tar.bz2
* 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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 5a97580..3ef04d4 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4950,8 +4950,9 @@ _bfd_elf_write_object_contents (bfd *abfd)
}
/* Write out the section header names. */
- if (bfd_seek (abfd, elf_tdata (abfd)->shstrtab_hdr.sh_offset, SEEK_SET) != 0
- || ! _bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd)))
+ if (elf_shstrtab (abfd) != NULL
+ && (bfd_seek (abfd, elf_tdata (abfd)->shstrtab_hdr.sh_offset, SEEK_SET) != 0
+ || ! _bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd))))
return FALSE;
if (bed->elf_backend_final_write_processing)