aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h6
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)
{