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.