[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/30844] ld riscv: --emit-relocs does not retain the original relo
From: |
amodra at gmail dot com |
Subject: |
[Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type |
Date: |
Fri, 15 Sep 2023 02:51:12 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30844
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amodra at gmail dot com
--- Comment #5 from Alan Modra <amodra at gmail dot com> ---
(In reply to Fangrui Song from comment #0)
> For GNU ld's AArch64/PPC64/x86-64 ports, the --emit-relocs code retains the
> original relocation type even if a linker optimization is applied.
No, ppc64 adjusts relocations to match the emitted code. See for example
R_PPC64_GOT16_LO_DS handling in ppc64_elf_relocate_section, adjusted to
R_PPC64_TOC16_LO when a got indirect code sequence can be edited to got pointer
relative.
> This is partly to communicate more information to the analysis tool
This is exactly why relocations for ppc64 (and ppc32) were edited. IBM's FDPR
post-link optimisation tool used them. ppc64 even emits relocs for linker
generated stub code.
The fact that other targets emit the original relocations is not a good
argument for saying that riscv should do so. Most maintainers of other targets
simply didn't see a need to correct the relocs when editing code.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/30844] New: ld riscv: --emit-relocs does not retain the original relocation type, i at maskray dot me, 2023/09/12
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type, i at maskray dot me, 2023/09/12
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type, i at maskray dot me, 2023/09/12
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type, palmer at gcc dot gnu.org, 2023/09/12
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type, i at maskray dot me, 2023/09/13
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type, palmer at gcc dot gnu.org, 2023/09/13
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type, nelsonc1225 at sourceware dot org, 2023/09/13
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type,
amodra at gmail dot com <=
- [Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type, i at maskray dot me, 2023/09/19