aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2023-08-04PR30697, ppc32 mix of local-dynamic and global-dynamic TLSAlan Modra1-9/+7
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-10IBM zSystems: Fix offset relative to static TLSStefan Schulze Frielinghaus2-4/+4
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. Lu1-2/+23
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
2022-11-19Automatic date update in version.inGDB Administrator1-1/+1
2022-11-18Automatic date update in version.inGDB Administrator1-1/+1