Thanks to D77248, we can bypass the use of stubs altogether and use PLT relocations if they are available for the target. LLVM and LLD support the R_AARCH64_PLT32 relocation, so we can also guarantee a static PLT relocation on AArch64. Not emitting these stubs saves a lot of extra binary size.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
clang/lib/CodeGen/CGVTables.cpp | ||
---|---|---|
633 | Could you add a method to TargetCodeGenInfo for this instead of hard-coding a list of architectures here? |
Comment Actions
Add a method to TargetCodeGenInfo the returns if the target supports PC relative PLT relocations,
Comment Actions
Update to use dso_local_equivalent instead of emitting stubs in the frontend. dso_local_equivalent should emit a stub automatically if one is required for the target (ie. it does not support PLTs).
Comment Actions
Rebased.
@rjmccall This might've changed a bit since you last accepted the revision. Will wait a couple of days before submitting if you have any more comments on this.
Could you add a method to TargetCodeGenInfo for this instead of hard-coding a list of architectures here?