[PATCH] Two more .eh_frame fixes
Jakub Jelinek
jakub@redhat.com
Sun Dec 30 15:29:00 GMT 2001
More information about the Binutils mailing list
Sun Dec 30 15:29:00 GMT 2001
- Previous message (by thread): MCS51 patch - part 1 of 2 - new files (for binutils 2.11.2)
- Next message (by thread): [PATCH] Two more .eh_frame fixes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi! I found two more problems with .eh_frame, fixed below. The first problem is that ld -r --eh-frame-hdr would die, since there is no dynobj yet it was trying to bfd_get_section_by_name, the second is that linking with --eh-frame-hdr and without gcc crt files (and no .eh_frame section anywhere) would die too (output .eh_frame section couldn't be found). Am terribly sorry for this, hopefully it is the last problem with the patch. Ok to commit? 2001-12-30 Jakub Jelinek <jakub@redhat.com> * 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. --- bfd/elflink.h.jj Tue Dec 18 14:30:32 2001 +++ bfd/elflink.h Fri Dec 28 02:03:47 2001 @@ -5670,7 +5670,7 @@ elf_bfd_final_link (abfd, info) goto error_return; } - if (info->eh_frame_hdr) + if (info->eh_frame_hdr && elf_hash_table (info)->dynobj) { o = bfd_get_section_by_name (elf_hash_table (info)->dynobj, ".eh_frame_hdr"); --- bfd/elf-eh-frame.c.jj Tue Dec 18 23:31:12 2001 +++ bfd/elf-eh-frame.c Fri Dec 28 12:52:32 2001 @@ -1149,6 +1149,9 @@ _bfd_elf_write_section_eh_frame_hdr (abf == 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; Jakub
- Previous message (by thread): MCS51 patch - part 1 of 2 - new files (for binutils 2.11.2)
- Next message (by thread): [PATCH] Two more .eh_frame fixes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list