| Issue |
238089
|
| Summary |
[RISCV] lld fails to relax zero- or gp-reachable memory references
|
| Labels |
lld
|
| Assignees |
|
| Reporter |
hpax
|
Small data generally go into an .sdata section, which is meant to be accessed via the (gp) register. In deep embedded applications, it is also possible that it accessible via the (zero) register.
GNU ld will relax such references, but lld apparently does not.
This zip file contains the source assembly and a linker script to demonstrate the problem, as well as the .o and .elf files generated by binutils as+ld and clang+lld. The .o files appear to me at least to be functionally identical.
Note that there is no C code involved at all; the source code is pure assembly.
The target specified was riscv32-none-elf, compiled from LLVM commit b537640e522af74799105c915af4222306771bb3 (LLVM 24 devel.)
[relax.zip](https://github.com/user-attachments/files/34290708/relax.zip)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs