With branch protection the jump to the jump table entries requires a landing pad.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM
llvm/lib/Transforms/IPO/LowerTypeTests.cpp | ||
---|---|---|
1244 | What I meant is, if a function has ignore-branch-target-enforcement, do not we want to skip the BTI hint in that function's CFI stub? Thinking about it some more - no, probably not. The attribute can be used on a "naked" function that already has BTI in the assembly; in that case we'd need BTI in the jump table as well. |
llvm/lib/Transforms/IPO/LowerTypeTests.cpp | ||
---|---|---|
1410 | This function is a jump table and each entry will have a landing pad ( see line 1235). Worst case we could add special condition for the first entry but IMHO that would be ugly. | |
1411 | Agree , I will update once the D85649 is updated as proposed there. |
I'd rather this was a named constant.