mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
Detect .eh_frame_hdr earlier for SIZEOF_HEADERS
Current code detects the need for PT_GNU_EH_FRAME using a field set by _bfd_elf_discard_section_eh_frame_hdr, which is called fairly late in the linking process. Use the elf hash table eh_info instead, which is set up earlier by size_dynamic_sections. * elf-bfd.h (struct output_elf_obj_tdata): Delete eh_frame_hdr. (elf_eh_frame_hdr): Don't define. (_bfd_elf_discard_section_eh_frame_hdr): Update prototype. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame_hdr): Delete abfd parameter. Don't set elf_eh_frame_hdr. * elf.c (elf_eh_frame_hdr): New function. (get_program_header_size): Adjust elf_eh_frame_hdr call. (_bfd_elf_map_sections_to_segments): Likewise.
This commit is contained in:
@ -14888,7 +14888,7 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
|
||||
|
||||
if (info->eh_frame_hdr_type
|
||||
&& !bfd_link_relocatable (info)
|
||||
&& _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info))
|
||||
&& _bfd_elf_discard_section_eh_frame_hdr (info))
|
||||
changed = 1;
|
||||
|
||||
return changed;
|
||||
|
Reference in New Issue
Block a user