[PATCH] D142879: [RISCV] Emit relocation for uleb128
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 21:39:43 PDT 2023
MaskRay added a comment.
This patch looks fine as to implement the functionality, but I am afraid that the used `requiresFixup` and `evaluateAsAbsolute` are not really reliable (https://maskray.me/blog/2021-03-14-the-dark-side-of-riscv-linker-relaxation "Label differences related to text section symbols"). Ideally we should not need`EnableULEB128Reloc`.
I plan to improve the reliability shortly.
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp:33
+static cl::opt<bool>
+ EnableULEB128Reloc("riscv-enable-uleb128", cl::init(false), cl::Hidden,
+ cl::desc("Enable relocation emission for ULEB128."));
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142879/new/
https://reviews.llvm.org/D142879
More information about the llvm-commits
mailing list