[llvm-branch-commits] [NFCI][ELF] Merge AddendOnly and AddendOnlyWithTargetVA (PR #150797)

Jessica Clarke via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Jul 27 10:56:39 PDT 2025


================
@@ -422,13 +422,10 @@ class DynamicReloc {
     /// The resulting dynamic relocation has already had its addend computed.
     /// Calling computeAddend() is an error. Only for internal use.
     Computed,
-    /// The resulting dynamic relocation does not reference a symbol (#sym must
-    /// be nullptr) and uses #addend as the result of computeAddend(ctx).
-    AddendOnly,
     /// The resulting dynamic relocation will not reference a symbol: #sym is
     /// only used to compute the addend with InputSection::getRelocTargetVA().
     /// Useful for various relative and TLS relocations (e.g. R_X86_64_TPOFF64).
-    AddendOnlyWithTargetVA,
+    AddendOnly,
----------------
jrtc27 wrote:

It can't; that's what dummySym is for. Note that getRelocTargetVA takes a reference not a pointer so we must have a symbol even if using R_ADDEND.

https://github.com/llvm/llvm-project/pull/150797


More information about the llvm-branch-commits mailing list