[lld][RISCV] Implement GP relaxation for R_RISCV_HI20/R_RISCV_LO12_I/R_RISCV_LO12_S.
This implements support for relaxing these relocations to use the GP register to compute addresses of globals in the .sdata and .sbss sections. This feature is off by default and must be enabled by passing --relax-gp to the linker. The GP register might not always be the "global pointer". It can be used for other purposes. See discussion here https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/371 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D143673
parent
b60513e3
Please register or sign in to comment