[llvm-branch-commits] [NFC][ELF][AArch64] Replace memtag hack with less-confusing code (PR #171182)
Jessica Clarke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 8 10:30:42 PST 2025
https://github.com/jrtc27 created https://github.com/llvm/llvm-project/pull/171182
The current implementation in addRelativeReloc makes it look like we're
writing the symbol's VA + addend to the section, because that's what the
given relocation will evaluate to, but we're supposed to be writing the
negated original addend (since the relative relocation's addend will be
the sum of the symbol's VA and the original addend). This only works
because deep down in AArch64::relocate we throw away the computed value
and peek back inside the relocation to extract the addend and negate it.
Do this properly by having a relocation that evaluates to the right
value instead.
More information about the llvm-branch-commits
mailing list