aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-12-31 11:49:10 +0000
committerJakub Jelinek <jakub@redhat.com>2001-12-31 11:49:10 +0000
commit57a7219709707bdaba1d8a47046c0f28cf6e064e (patch)
treeae5fa258b4c901a3f87b95c7a8c1b0bd85fa8d39 /bfd/elf-eh-frame.c
parent330693f5abc336fe08cf5f6fa63e81e5245af6cf (diff)
downloadgdb-57a7219709707bdaba1d8a47046c0f28cf6e064e.zip
gdb-57a7219709707bdaba1d8a47046c0f28cf6e064e.tar.gz
gdb-57a7219709707bdaba1d8a47046c0f28cf6e064e.tar.bz2
* elflink.h (elf_bfd_final_link): Check if dynobj is not NULL
before looking for .eh_frame_hdr section. * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): If .eh_frame_hdr section is being stripped from output, don't do anything.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r--bfd/elf-eh-frame.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index d39e549..cc653f7 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1149,6 +1149,9 @@ _bfd_elf_write_section_eh_frame_hdr (abfd, sec)
== ELF_INFO_TYPE_EH_FRAME_HDR);
hdr_info = (struct eh_frame_hdr_info *)
elf_section_data (sec)->sec_info;
+ if (hdr_info->strip)
+ return true;
+
size = EH_FRAME_HDR_SIZE;
if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count)
size += 4 + hdr_info->fde_count * 8;