[PATCH] D157657: [RISCV] Support R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 for .uleb128 directives
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 16:13:51 PDT 2023
jrtc27 added inline comments.
================
Comment at: llvm/include/llvm/MC/MCFixup.h:27
+ FK_Data_8, ///< A eight-byte fixup.
+ FK_Data_uleb128, ///< A .uleb128 fixup.
+ FK_PCRel_1, ///< A one-byte pc relative fixup.
----------------
I guess the sign is relevant here but not for the others because we have to know how to pad it? (Though what about FK_Data_8 on a 32-bit target?..)
================
Comment at: llvm/test/MC/ELF/RISCV/gen-dwarf.s:53
# RELOC-NEXT: 0xD R_RISCV_64 .text.foo 0x0
+# RELOC-NEXT: 0x15 R_RISCV_SET_ULEB128 <null> 0x0
+# RELOC-NEXT: 0x15 R_RISCV_SUB_ULEB128 .text.foo 0x0
----------------
Is this actually the null symbol or has this just not read in the symbol table properly?
================
Comment at: llvm/test/MC/RISCV/leb128.s:32-33
+# CHECK-NEXT: .rela.alloc_w {
+# CHECK-NEXT: 0x0 R_RISCV_SET_ULEB128 w1 0x0
+# CHECK-NEXT: 0x0 R_RISCV_SUB_ULEB128 w 0x0
+# NORELAX-NEXT: 0x2 R_RISCV_CALL_PLT foo 0x0
----------------
Double spaces here
Also why is this one CHECK but w2-w1 is RELAX?
================
Comment at: llvm/test/MC/RISCV/leb128.s:34
+# CHECK-NEXT: 0x0 R_RISCV_SUB_ULEB128 w 0x0
+# NORELAX-NEXT: 0x2 R_RISCV_CALL_PLT foo 0x0
+# RELAX-NEXT: 0x1 R_RISCV_SET_ULEB128 w2 0x0
----------------
Make this CHECK and move it down as it's shared?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157657/new/
https://reviews.llvm.org/D157657
More information about the llvm-commits
mailing list