[PATCH] D93045: [ELF] AArch64: Handle DT_AARCH64_VARIANT_PCS

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 10:43:05 PST 2020


zatrazz added inline comments.


================
Comment at: lld/ELF/SyntheticSections.cpp:1440
+    case EM_AARCH64:
+      if (in.relaPlt->aarch64VariantPcs)
+        addInt(DT_AARCH64_VARIANT_PCS, 0);
----------------
MaskRay wrote:
> zatrazz wrote:
> > MaskRay wrote:
> > > Instead of introducing a member aarch64VariantPcs, would iterating in.relaPlt->relocs here make the AArch64 specific code more isolated?
> > I though about about, but I decided to add a new member since it might be costly to iterate over all relocations to check if it is a target->relPlt and if the symbols has the STO_AARCH64_VARIANT_PCS. I don't have a strong preference here in fact.
> How is costly to iterate `in.relaPlt`?
> 
> It actually performs less testing than `config->emachine == EM_AARCH64 && reloc.type == target->pltRel` which has an additional emachine test.
> 
> There is also a question whether `in.relaIplt` and R_AARCH64_IRELATIVE should be tested.
It depends of how many relocation are within in.relaPlt, but I think it should not penalize other architectures. I will move the test in the case of EM_AARCH64 only. 

And we, adding solely R_AARCH64_JMP_SLOT to ifunc should generate the dynamic tag. I will fix it as well.


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

https://reviews.llvm.org/D93045



More information about the llvm-commits mailing list