aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-02-04 19:30:47 +1030
committerAlan Modra <amodra@gmail.com>2022-02-05 16:45:38 +1030
commit8df52eeeb06efcccd6b840689ad8e11ebb264e7f (patch)
treed44d46440c42aa85341f01f73302b853ae0fb19e /bfd/elf-bfd.h
parent06c441cceffb1437a3af51bfad43dce5fd200d9e (diff)
downloadgdb-8df52eeeb06efcccd6b840689ad8e11ebb264e7f.zip
gdb-8df52eeeb06efcccd6b840689ad8e11ebb264e7f.tar.gz
gdb-8df52eeeb06efcccd6b840689ad8e11ebb264e7f.tar.bz2
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.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 138ef46..1d3ae76 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1909,10 +1909,6 @@ struct output_elf_obj_tdata
/* STT_SECTION symbols for each section */
asymbol **section_syms;
- /* Used to determine if PT_GNU_EH_FRAME segment header should be
- created. */
- asection *eh_frame_hdr;
-
/* NT_GNU_BUILD_ID note type info. */
struct
{
@@ -2116,7 +2112,6 @@ struct elf_obj_tdata
#define elf_seg_map(bfd) (elf_tdata(bfd) -> o->seg_map)
#define elf_link_info(bfd) (elf_tdata(bfd) -> o->link_info)
#define elf_next_file_pos(bfd) (elf_tdata(bfd) -> o->next_file_pos)
-#define elf_eh_frame_hdr(bfd) (elf_tdata(bfd) -> o->eh_frame_hdr)
#define elf_stack_flags(bfd) (elf_tdata(bfd) -> o->stack_flags)
#define elf_shstrtab(bfd) (elf_tdata(bfd) -> o->strtab_ptr)
#define elf_onesymtab(bfd) (elf_tdata(bfd) -> symtab_section)
@@ -2412,7 +2407,7 @@ extern bool _bfd_elf_discard_section_eh_frame
extern bool _bfd_elf_adjust_eh_frame_global_symbol
(struct elf_link_hash_entry *, void *);
extern bool _bfd_elf_discard_section_eh_frame_hdr
- (bfd *, struct bfd_link_info *);
+ (struct bfd_link_info *);
extern bfd_vma _bfd_elf_eh_frame_section_offset
(bfd *, struct bfd_link_info *, asection *, bfd_vma);
extern bool _bfd_elf_write_section_eh_frame