[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 17:21:42 PDT 2019


MaskRay added a comment.

In D57940#1438313 <https://reviews.llvm.org/D57940#1438313>, @ruiu wrote:

> Not sure if I follow. Looks like you always instantiate the template using `ELFT::Rela`, so effectively you are assuming that all targets are using RELA (which is a wrong assumption by the way)? I think you need to dispatch using `Config->IsRela`.


`Config->IsRela` is the target default but the object file may have both `SHT_REL` and `SHT_RELA` (may not be realistic but then intention of `AreRelocsRela` is probably for this purpose). I've changed that.


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