diff options
author | Alan Modra <amodra@gmail.com> | 2021-03-20 10:22:37 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-03-20 10:35:18 +1030 |
commit | 15407e7e0d42a46de5534df22eec933fc45178a3 (patch) | |
tree | 82ce351900575c29f868e779a046e98d803ac73c /bfd | |
parent | 6536577167960d0d98ee5d0ccbb3ba70c2db2f9a (diff) | |
download | binutils-15407e7e0d42a46de5534df22eec933fc45178a3.zip binutils-15407e7e0d42a46de5534df22eec933fc45178a3.tar.gz binutils-15407e7e0d42a46de5534df22eec933fc45178a3.tar.bz2 |
DWARF LTO debug sections vs. .stabstr
The exception for debug sections in clearing SEC_EXCLUDE when
relocatable was really for one specific debug section, so let's make
it do just that.
bfd/
PR 27590
* elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
test for .gnu.debuglto*.
ld/
PR 27590
* ldlang.c (lang_gc_sections): Clear SEC_EXCLUDE when relocatable
for all sections except .stabstr.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/elf.c | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2e43a4d..90ec96b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,7 +1,13 @@ +2021-03-20 Alan Modra <amodra@gmail.com> + + PR 27590 + * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE + test for .gnu.debuglto*. + 2021-03-18 H.J. Lu <hongjiu.lu@intel.com> PR ld/27590 - * elf.c (_bfd_elf_make_section_from_shdr): Treate + * elf.c (_bfd_elf_make_section_from_shdr): Treat .gnu.debuglto_.debug_ section as debugging section unless it is marked with SHF_EXCLUDE. * elflink.c (elf_create_symbuf): Revert commit 994b2513281. @@ -1085,10 +1085,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, if (name [0] == '.') { if (strncmp (name, ".debug", 6) == 0 - /* NB: Treate .gnu.debuglto_.debug_ section as debugging - section unless it is marked with SHF_EXCLUDE. */ - || ((flags & SEC_EXCLUDE) == 0 - && strncmp (name, ".gnu.debuglto_.debug_", 21) == 0) + || strncmp (name, ".gnu.debuglto_.debug_", 21) == 0 || strncmp (name, ".gnu.linkonce.wi.", 17) == 0 || strncmp (name, ".zdebug", 7) == 0) flags |= SEC_DEBUGGING | SEC_ELF_OCTETS; |