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

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 12:05:41 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:
> 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.


================
Comment at: lld/ELF/SyntheticSections.h:509
   int32_t dynamicTag, sizeDynamicTag;
+  bool aarch64VariantPcs;
   std::vector<DynamicReloc> relocs;
----------------
MaskRay wrote:
> Prefer member initializer `= false;`
Ack.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93045



More information about the llvm-commits mailing list