diff options
author | Alan Modra <amodra@gmail.com> | 2018-12-28 09:41:44 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-12-28 15:02:08 +1030 |
commit | 0e41bebb938dbe9eae7063f5321429194bfc5ab7 (patch) | |
tree | b29f3fb4479bd29ebb404d81e1d0e4f7d1f2fd75 /bfd/ChangeLog | |
parent | cb87d9f1a49986b2eb92ac381444f4cc7c9d8a4f (diff) | |
download | gdb-0e41bebb938dbe9eae7063f5321429194bfc5ab7.zip gdb-0e41bebb938dbe9eae7063f5321429194bfc5ab7.tar.gz gdb-0e41bebb938dbe9eae7063f5321429194bfc5ab7.tar.bz2 |
PR24015, glibc-2.28 on little-endian mips32 broken
Commit 2bf2bf23da exposed a bug on targets that create common sections
other than the standard ELF SHN_COMMON. If these are output by ld -r,
then their type becomes SHT_PROGBITS unless the target handles them
specially (eg. by elf_backend_special_sections), and if they are
merged into .bss/.sbss by ld -r then that section becomes SHT_PROGBITS.
Worse, if they are output by ld -r, then their size is increased by
bfd_generic_define_common_symbol during final link, which leads to
bogus file contents being copied to output.
For mips, it seems to me that the .scommon section should not be
output for ld -r, but I haven't made that change in this patch.
PR 24015
* elf.c (bfd_elf_get_default_section_type): Make common sections
SHT_NOBITS.
* linker.c (bfd_generic_define_common_symbol): Clear
SEC_HAS_CONTENTS.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8a073f6..1396c70 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,13 @@ 2018-12-28 Alan Modra <amodra@gmail.com> + PR 24015 + * elf.c (bfd_elf_get_default_section_type): Make common sections + SHT_NOBITS. + * linker.c (bfd_generic_define_common_symbol): Clear + SEC_HAS_CONTENTS. + +2018-12-28 Alan Modra <amodra@gmail.com> + PR 23966 * libbfd.c (SSIZE_MAX): Define. (bfd_malloc, bfd_realloc): Don't cast size to long to check for |