[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/22263] -fpie -pie generates dynamic relocations in text section
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/22263] -fpie -pie generates dynamic relocations in text section |
Date: |
Sat, 27 May 2023 01:25:07 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22263
--- Comment #31 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The master branch has been updated by Nelson Chu <nelsonc1225@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=225df051d3d4cf714d1791b9035966a6686b3f3d
commit 225df051d3d4cf714d1791b9035966a6686b3f3d
Author: Nelson Chu <nelson@nelson.ba.rivosinc.com>
Date: Thu May 4 17:08:50 2023 +0800
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
* For PR ld/25694,
In the check_reloc, refer to spare and loongarch, they don't need to
reserve
any local dynamic reloc for TLS LE in pie/pde, and similar to other
targets.
So it seems like riscv was too conservative to estimate the TLS LE before.
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
TEXTREL problem.
* For PR ld/22263,
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS
port.
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it
seems
also the right way to do the same thing for risc-v.
On risc-v, fixes
FAIL: Build pr22263-1
RISC-V haven't supported the TLS transitions, so will need the same fix
(use
bfd_link_dll) in the future.
bfd/
PR ld/22263
PR ld/25694
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
relocation for TLS LE in pie/pde, and report error in pic just like
before.
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll
rather
than !bfd_link_pic in determining the dynamic symbol index. Avoid
the index of -1.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/22263] -fpie -pie generates dynamic relocations in text section, address@hidden, 2023/05/23
- [Bug ld/22263] -fpie -pie generates dynamic relocations in text section, address@hidden, 2023/05/23
- [Bug ld/22263] -fpie -pie generates dynamic relocations in text section, amodra at gmail dot com, 2023/05/25
- [Bug ld/22263] -fpie -pie generates dynamic relocations in text section, amodra at gmail dot com, 2023/05/25
- [Bug ld/22263] -fpie -pie generates dynamic relocations in text section, cvs-commit at gcc dot gnu.org, 2023/05/25
- [Bug ld/22263] -fpie -pie generates dynamic relocations in text section, amodra at gmail dot com, 2023/05/25
- [Bug ld/22263] -fpie -pie generates dynamic relocations in text section,
cvs-commit at gcc dot gnu.org <=