llvm-project
669c755d - [NFC][ELF][AArch64][MTE] Replace addend hack with less-confusing code

Commit
35 days ago
[NFC][ELF][AArch64][MTE] Replace addend hack with less-confusing code 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. Reviewers: kovdan01, MaskRay Reviewed By: MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/171182
Author
Parents
Loading