[PATCH] D93045: [ELF] AArch64: Handle DT_AARCH64_VARIANT_PCS
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 11 09:12:38 PST 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:1440
+ case EM_AARCH64:
+ if (in.relaPlt->aarch64VariantPcs)
+ addInt(DT_AARCH64_VARIANT_PCS, 0);
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93045/new/
https://reviews.llvm.org/D93045
More information about the llvm-commits
mailing list