aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-08-01libctf: fix ref leak of names of newly-inserted non-root-visible typesbinutils-2_39-branchNick Alcock1-4/+4
A bug in ctf_dtd_delete led to refs in the string table to the names of non-root-visible types not being removed when the DTD was. This seems harmless, but actually it would lead to a write down a pointer into freed memory if such a type was ctf_rollback()ed over and then the dict was serialized (updating all the refs as the strtab was serialized in turn). Bug introduced in commit fe4c2d55634c700ba527ac4183e05c66e9f93c62 ("libctf: create: non-root-visible types should not appear in name tables") which is included in binutils 2.35. libctf/ * ctf-create.c (ctf_dtd_delete): Remove refs for all types with names, not just root-visible ones.
2023-08-04PR30697, ppc32 mix of local-dynamic and global-dynamic TLSAlan Modra4-9/+37
This fixes miscounting of dynamic relocations on GOT entries when a) there are both local-dynamic and global-dynamic tls accesss for a given symbol, and b) the symbol is global with non-default visibility, and c) the __tls_get_addr calls aren't optimised away. PR 30697 bfd/ * elf32-ppc.c (allocate_dynrelocs): Correct local-dynamic reloc count. ld/ * testsuite/ld-powerpc/tls32ldgd.d, * testsuite/ld-powerpc/tls32ldgd.s: New test. * testsuite/ld-powerpc/powerpc.exp: Run it. (cherry picked from commit ae33771224660dac25e64c3f70943a17bfab7681)
2023-01-16LoongArch: ld: Fix hidden ifunc symbol linker error bug.mengqinggang1-1/+4
For hidden ifunc symbols, it not have GOT entry, only have gotplt entry. When process R_LARCH_SOP_PUSH_GPREL, the offset is gotplt entry address minus GOT address. When call bfd_put_NN(got->contents + offset), the absolute value of offset is grather than got size, and other memory not belonging to GOT is be overwritten. bfd/ChangeLog: * elfnn-loongarch.c (loongarch_elf_relocate_section): If hidden ifunc symbol, don't call bfd_put_NN.
2023-01-12ARM: Fix ld bloat introduced between binutils-2.38 and 2.39Hans-Peter Nilsson1-4/+0
Since commit 9833b7757d24, "PR28824, relro security issues", ELF_MAXPAGESIZE matters much more, with regards to layout of the linked file. That commit fixed an actual bug, but also exposes a problem for targets were that value is too high. For example, for ARM(32, a.k.a. "Aarch32") specifically bfd_arch_arm, it's set to 64 KiB, making all Linux(/GNU) targets pay an extra amount of up to 60 KiB of bloat in DSO:s and executables. This matters when there are many such files, and where storage is expensive. It's *mostly* bloat when using a Linux kernel, as ARM(32) is a good example of an target where ELF_MAXPAGESIZE is set to an extreme value for an obscure corner-case. The ARM (32-bit) kernel has 4 KiB pages, has had that value forever, and can't be configured to any other value. The use-case is IIUC "Aarch32" emulation on an "Aarch64" (arm64) kernel, but not just that, but a setup where the Linux page-size is configured to something other than the *default* 4 KiB. Not sure there actually any such systems in use, again with both Aarch32 compatibility support and a non-4KiB pagesize, with all the warnings in the kernel config and requiring the "EXPERT" level set on. So, let's do like x86-64 in a2267dbfc9e1 "x86-64: Use only one default max-page-size" and set ELF_MAXPAGESIZE to 4096. bfd: * elf32-arm.c (ELF_MAXPAGESIZE): Always set to 0x1000. (cherry picked from commit 1a26a53a0dee39106ba58fcb15496c5f13074652)
2023-01-12ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000Hans-Peter Nilsson7-28/+31
Many tests reflect a setting of ELF_MAXPAGESIZE to 64 KiB. With ELF_MAXPAGESIZE changed to 4 KiB, layout is sometimes different and symbols end up in other places. Avoid churn and regexpification of old test patterns by passing the max-page-size setting active at the time. ld/testsuite: * testsuite/ld-arm/arm-elf.exp, testsuite/ld-arm/non-contiguous-arm2.d, testsuite/ld-arm/non-contiguous-arm3.d, testsuite/ld-arm/non-contiguous-arm5.d, testsuite/ld-arm/non-contiguous-arm6.d, testsuite/ld-arm/thumb-plt-got.d, testsuite/ld-arm/thumb-plt.d: Pass -z max-page-size=0x10000 explicitly to test that rely on that value in output-matching patterns.
2023-01-10IBM zSystems: Fix offset relative to static TLSStefan Schulze Frielinghaus4-4/+24
For local exec TLS relocations of the form foo@NTPOFF+x the addend was ignored. bfd/ChangeLog: * elf32-s390.c (elf_s390_relocate_section): Honor addend for R_390_TLS_LE32. * elf64-s390.c (elf_s390_relocate_section): Honor addend for R_390_TLS_LE64. ld/ChangeLog: * testsuite/ld-s390/reloctlsle-1.d: New test. * testsuite/ld-s390/reloctlsle-1.s: New test. (cherry picked from commit aefebe82dc89711384b85329daa48d04c1d3a45b)
2023-01-03x86-64: Allocate input section memory if neededH.J. Lu2-2/+40
When --no-keep-memory is used, the input section memory may not be cached. Allocate input section memory for -z pack-relative-relocs if needed. bfd/ PR ld/29939 * elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Allocate input section memory if needed. ld/ PR ld/29939 * testsuite/ld-elf/dt-relr-2i.d: New test. (cherry picked from commit 9eb71a53bf36a370e21a6fbbb21e2726f64b0fd0)
2023-01-01Automatic date update in version.inGDB Administrator1-1/+1
2022-12-31Automatic date update in version.inGDB Administrator1-1/+1
2022-12-30Automatic date update in version.inGDB Administrator1-1/+1
2022-12-29Automatic date update in version.inGDB Administrator1-1/+1
2022-12-28Automatic date update in version.inGDB Administrator1-1/+1
2022-12-27Automatic date update in version.inGDB Administrator1-1/+1
2022-12-26Automatic date update in version.inGDB Administrator1-1/+1
2022-12-25Automatic date update in version.inGDB Administrator1-1/+1
2022-12-24Automatic date update in version.inGDB Administrator1-1/+1
2022-12-23Automatic date update in version.inGDB Administrator1-1/+1
2022-12-22Automatic date update in version.inGDB Administrator1-1/+1
2022-12-21Automatic date update in version.inGDB Administrator1-1/+1
2022-12-20Automatic date update in version.inGDB Administrator1-1/+1
2022-12-19Automatic date update in version.inGDB Administrator1-1/+1
2022-12-18Automatic date update in version.inGDB Administrator1-1/+1
2022-12-17Automatic date update in version.inGDB Administrator1-1/+1
2022-12-16Automatic date update in version.inGDB Administrator1-1/+1
2022-12-15Automatic date update in version.inGDB Administrator1-1/+1
2022-12-14Automatic date update in version.inGDB Administrator1-1/+1
2022-12-13Automatic date update in version.inGDB Administrator1-1/+1
2022-12-12Automatic date update in version.inGDB Administrator1-1/+1
2022-12-11Automatic date update in version.inGDB Administrator1-1/+1
2022-12-10Automatic date update in version.inGDB Administrator1-1/+1
2022-12-09Automatic date update in version.inGDB Administrator1-1/+1
2022-12-08Automatic date update in version.inGDB Administrator1-1/+1
2022-12-07Automatic date update in version.inGDB Administrator1-1/+1
2022-12-06Automatic date update in version.inGDB Administrator1-1/+1
2022-12-05Automatic date update in version.inGDB Administrator1-1/+1
2022-12-04Automatic date update in version.inGDB Administrator1-1/+1
2022-12-03Automatic date update in version.inGDB Administrator1-1/+1
2022-12-02Automatic date update in version.inGDB Administrator1-1/+1
2022-12-01Automatic date update in version.inGDB Administrator1-1/+1
2022-11-30Automatic date update in version.inGDB Administrator1-1/+1
2022-11-29Automatic date update in version.inGDB Administrator1-1/+1
2022-11-28Automatic date update in version.inGDB Administrator1-1/+1
2022-11-27Automatic date update in version.inGDB Administrator1-1/+1
2022-11-26Automatic date update in version.inGDB Administrator1-1/+1
2022-11-25Automatic date update in version.inGDB Administrator1-1/+1
2022-11-24Automatic date update in version.inGDB Administrator1-1/+1
2022-11-23Automatic date update in version.inGDB Administrator1-1/+1
2022-11-22Automatic date update in version.inGDB Administrator1-1/+1
2022-11-21Automatic date update in version.inGDB Administrator1-1/+1
2022-11-20Automatic date update in version.inGDB Administrator1-1/+1