[PATCH] D57940: Refactor RelocVisitor and fix computation of SHT_RELA-typed relocation entries

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 18:47:01 PDT 2019


MaskRay added a comment.

In D57940#1438854 <https://reviews.llvm.org/D57940#1438854>, @arichardson wrote:

> In D57940#1438813 <https://reviews.llvm.org/D57940#1438813>, @MaskRay wrote:
>
> > dispatch using Config->IsRela
>
>
> The value of `getAddend<ELFT>(Rel);` now only seems to be in `Ref.getRawDataRefImpl().p` now. Shouldn't the rel case also be adding the implicit addend? I'm not sure I'm reading the code currently but it looks to me like REL no longer gets the addend added.


For the `REL` case, the addend is supplied by the caller as the parameter `A`. `A` is supplied by `llvm/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp:getRelocatedValue`.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57940/new/

https://reviews.llvm.org/D57940





More information about the llvm-commits mailing list