diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-04-21 05:23:51 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-04-21 05:24:03 -0700 |
commit | 6f6fd151cbf226bbaa66e44977f57b7c6dc33d89 (patch) | |
tree | 0ef4a78de35fde84a58c5964f7822a19a95c620c /bfd/ChangeLog | |
parent | 1f7f2abbc31ee9e6d4faca58bef14d8ee8cb1bd2 (diff) | |
download | gdb-6f6fd151cbf226bbaa66e44977f57b7c6dc33d89.zip gdb-6f6fd151cbf226bbaa66e44977f57b7c6dc33d89.tar.gz gdb-6f6fd151cbf226bbaa66e44977f57b7c6dc33d89.tar.bz2 |
elf: Strip zero-sized dynamic sections
ELF size_dynamic_sections is called by the ELF backend linker after all
the linker input files have been seen but before the section sizes have
been set. After the sections sizes have been set, target-specific,
global optimizations may make some dynamic sections zero-sized if they
are no longer needed.
Add ELF strip_zero_sized_dynamic_sections so that ELF backend linker can
strip zero-sized dynamic sections after the sections sizes have been set.
bfd/
PR ld/25849
* elf-bfd.h (elf_backend_data): Add
elf_backend_strip_zero_sized_dynamic_sections.
(_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
* elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
New macro.
* elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
function.
* elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
New macro.
(elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
ld/
PR ld/25849
* ldelfgen.c (ldelf_map_segments): Call
elf_backend_strip_zero_sized_dynamic_sections.
* testsuite/ld-alpha/tlsbinr.rd: Updated.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a15a0f3..8bc7ee9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,19 @@ 2020-04-21 H.J. Lu <hongjiu.lu@intel.com> + PR ld/25849 + * elf-bfd.h (elf_backend_data): Add + elf_backend_strip_zero_sized_dynamic_sections. + (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype. + * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections): + New macro. + * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New + function. + * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections): + New macro. + (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections. + +2020-04-21 H.J. Lu <hongjiu.lu@intel.com> + * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with sec. (elf64_alpha_check_relocs): Set sec instead of reltext. Warn |