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 /bfd/elflink.h | |
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.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r-- | bfd/elflink.h | 6 |
1 files changed, 4 insertions, 2 deletions
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) { |