[PATCH] D83871: [llvm-readobj/readelf] - Refactor how the code dumps relocations.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 01:20:54 PDT 2020
jhenderson added a comment.
In D83871#2157573 <https://reviews.llvm.org/D83871#2157573>, @MaskRay wrote:
> LLD uses `template RelTy` so there is prior art... For llvm-readobj, this seems to fix a misnomer. This is a +1 to me.
>
> Have you considered https://bugs.llvm.org/show_bug.cgi?id=44257 Does this change make that easier or more difficult to fix?
+1 from me in principle. I actually think this will make that fix easier thanks to the overloaded `getAddend` function now existing. That function might need to be a member function to fix the original issue, or its signature changed, but it provides an obvious spot to implement the required functionality, at least in my mind.
================
Comment at: llvm/lib/Object/ELF.cpp:313-315
+ Elf_Rel Rela;
Rela.r_info = 0;
Rela.setType(getRelativeRelocationType(), false);
----------------
Probably best not to call an `Elf_Rel` object `Rela`...!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83871/new/
https://reviews.llvm.org/D83871
More information about the llvm-commits
mailing list