[llvm] [BOLT][AArch64] Add support for long absolute LLD thunks/veneers (PR #113408)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 03:49:28 PST 2024
================
@@ -29,30 +29,47 @@ static llvm::cl::opt<bool>
namespace llvm {
namespace bolt {
+static bool isPossibleVeneer(const BinaryFunction &BF) {
+ return BF.isAArch64Veneer() || BF.getOneName().starts_with("__AArch64");
----------------
paschalis-mpeis wrote:
@smithp35 made a similar suggestion with mine [here](https://github.com/llvm/llvm-project/pull/113408#discussion_r1830687038) (2nd paragraph).
But it looks like there is a more complex scenario: a hypothetical non-PI binary that has mixed PIC and non-PIC segments?
Not sure if my understanding is correct.
In theory at least, it should be possible/legal to do such a call.
But if we have such a veneer in an otherwise PIC segment, wouldn't that make the entire segment a non-PIC? (at least in theory).
---
Regarding BOLT itself, TMU it assumes that a binary is PIC if the ELF file is not `ET_EXEC`; it does not keep such information per segment.
https://github.com/llvm/llvm-project/pull/113408
More information about the llvm-commits
mailing list