[PATCH] D143673: [lld][RISCV] Implement GP relaxation for R_RISCV_HI20/R_RISCV_LO12_I/R_RISCV_LO12_S.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 17:43:15 PST 2023


craig.topper added inline comments.


================
Comment at: lld/test/ELF/riscv-relax-hi20-lo12.s:6
+# RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=+c,+relax %s -o %t.rv32c.o
+# RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=+c,+relax %s -o %t.rv64c.o
+
----------------
MaskRay wrote:
> craig.topper wrote:
> > MaskRay wrote:
> > > We may need a test for `-pie`.
> > -pie should use %pcrel relocations right?
> We should have a meaningful diagnostic referencing a non-absolute symbol with an absolute relocation in -pie mode. It probably doesn't belong to this test.
> 
> In addition, it's valid to reference SHN_ABS symbols in `-pie` mode. We should test that SHN_ABS symbols are correctly handled. Whether it's handled doesn't matter since such cases are super rare.
How do I make an SHN_ABS symbol?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143673/new/

https://reviews.llvm.org/D143673



More information about the llvm-commits mailing list