summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2001-12-14 01:52:27 +0000
committerAlan Modra <amodra@bigpond.net.au>2001-12-14 01:52:27 +0000
commit44b5ac092b2b5ae8842117f24fb565a885238941 (patch)
tree1a57884c92cabe6cc7bc2da4dec8ed5267d9bab9 /bfd
parent8b7c0f7ee3c9083797b1589d417e8192d4a9e629 (diff)
downloadgdb-44b5ac092b2b5ae8842117f24fb565a885238941.tar.gz
* elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elflink.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 36539921d44..81e491306e5 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 37ea63d4ece..a5e348d15be 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)
{