[PATCH] D120379: [BOLT] Support PC-relative relocations with addends
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 23 10:24:28 PST 2022
ayermolo added inline comments.
================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1359
+ const Relocation &Relocation = Itr->second;
+ uint64_t SymbolValue = Relocation.Value - Relocation.Addend;
+ if (Relocation.isPCRelative())
----------------
I think I miss understand something. Why are we subtracting Addend from the Value of relocation? Isn't it S + A - P?
Presumably Relocation.Vaue is the address of the Symbol?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120379/new/
https://reviews.llvm.org/D120379
More information about the llvm-commits
mailing list