diff options
author | Nick Clifton <nickc@redhat.com> | 2020-08-20 10:19:47 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-08-20 10:19:47 +0100 |
commit | 44466e45c51b1c68ed2f95f86bcdb1f18f08b380 (patch) | |
tree | 1ff4a510d9fbf38f3c03274b8b5b93018c177bf9 /bfd/elf-bfd.h | |
parent | c2fd7faea8f2c3a267f276ceb6a95f9f537ea7c1 (diff) | |
download | gdb-44466e45c51b1c68ed2f95f86bcdb1f18f08b380.zip gdb-44466e45c51b1c68ed2f95f86bcdb1f18f08b380.tar.gz gdb-44466e45c51b1c68ed2f95f86bcdb1f18f08b380.tar.bz2 |
Apply a workaround to mitigate a quadratic performance hit in the linker when writing out secondary reloc sections.
PR 26406
* elf-bfd.h (struct bfd_elf_section_data): Add
has_secondary_relocs field.
* elf.c (_bfd_elf_copy_special_section_fields): Set the
has_secondary_relocs field for sections which have associated
secondary relocs.
* elfcode.h (elf_write_relocs): Only call write_secondary_relocs
on sections which have associated secondary relocs.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index cd352d2..eebdf9a 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1756,6 +1756,11 @@ struct bfd_elf_section_data /* Link from a text section to its .eh_frame_entry section. */ asection *eh_frame_entry; + /* TRUE if the section has secondary reloc sections associated with it. + FIXME: In the future it might be better to change this into a list + of secondary reloc sections, making lookup easier and faster. */ + bfd_boolean has_secondary_relocs; + /* A pointer used for various section optimizations. */ void *sec_info; }; |