Cross-DSO CFI needs all __cfi_check exports to use the same encoding
(ARM vs Thumb).
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM
llvm/test/Transforms/CrossDSOCFI/thumb.ll | ||
---|---|---|
2 ↗ | (On Diff #113005) | Maybe add a negative test? |
Not the way I'd have done this. What you probably need to do if adding a stub is propagate the features from the function you're cloning rather than constructing a new (and possibly incomplete) set of features from the target triple yourself.
There is nothing to propagate from: it's a new function, not a clone of any other.
I guess we could ask the frontend to emit a default set of target features?
Which isn't necessarily going to be valid either - particularly in the face of LTO.
What are you trying to accomplish here?
__cfi_check is a compiler-generated function (frontend inserts a stub, then LTO fills in the body). I want it to be built as Thumb, and never as ARM.
Have the front end generate all of the correct target features for your stub then rather than adding them in the backend?