diff options
author | Alan Modra <amodra@gmail.com> | 2001-12-14 01:52:27 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-12-14 01:52:27 +0000 |
commit | 72dd63313e8cb74677909607af86966d7f6a9f8e (patch) | |
tree | 24f35f74ade24d39461c1e07a3657f2be170f103 | |
parent | 181c33691e3a19b229a37cd1e1eaa35d6ea59efc (diff) | |
download | gdb-72dd63313e8cb74677909607af86966d7f6a9f8e.zip gdb-72dd63313e8cb74677909607af86966d7f6a9f8e.tar.gz gdb-72dd63313e8cb74677909607af86966d7f6a9f8e.tar.bz2 |
* elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elflink.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3653992..81e4913 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2001-12-14 Alan Modra <amodra@bigpond.net.au> + + * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL. + 2001-12-13 Jakub Jelinek <jakub@redhat.com> * elf-bfd.h (enum elf_link_info_type): New. diff --git a/bfd/elflink.h b/bfd/elflink.h index 37ea63d..a5e348d 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -7950,8 +7950,10 @@ elf_bfd_discard_info (output_bfd, info) || ! is_elf_hash_table (info)) return false; - ehdr = bfd_get_section_by_name (elf_hash_table (info)->dynobj, - ".eh_frame_hdr"); + ehdr = NULL; + if (elf_hash_table (info)->dynobj != NULL) + ehdr = bfd_get_section_by_name (elf_hash_table (info)->dynobj, + ".eh_frame_hdr"); for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next) { |