[PATCH] D91530: [llvm-readobj] - Introduce `forEachRelocationDo` helper. NFCI.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 17 00:07:25 PST 2020
MaskRay added a comment.
In D91530#2398857 <https://reviews.llvm.org/D91530#2398857>, @grimar wrote:
> In D91530#2398695 <https://reviews.llvm.org/D91530#2398695>, @MaskRay wrote:
>
>> I don't get why `RelRelaReloc` is needed. Can you describe a bit about it?
>
> Previously the `Relocation` was the struct which allowed to handle `Rel/Rela` relocations.
> I've reworked it so that it how also is able to keep `Relr` relocations.
> That way it allows to represent 3 types of relocations instead of previous 2 and have a common code for iterations over them.
>
> `RelRelaReloc` is now a helper class that is used to represent `Rel/Rela` relocations.
OK. Does this change make Relr easier to represent? Note that while REL/RELA type relocations are self-contained (the sh_offset is immediately known), RELR is not - it needs a context ((1) is it an address or a bitmap (2) for a bitmap, what is the starting address). Should it just be treated as a special case?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91530/new/
https://reviews.llvm.org/D91530
More information about the llvm-commits
mailing list