[PATCH] D139092: [LLD][ELF] Cortex-M Security Extensions (CMSE) Support
Amilendra Kodithuwakku via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 10:33:06 PDT 2023
amilendra marked 2 inline comments as done.
amilendra added inline comments.
================
Comment at: lld/ELF/Arch/ARM.cpp:1004
+ continue;
+ // If input object build attributes do not support CMSE, error and disable
+ // further scanning for <sym>, __acle_se_<sym> pairs.
----------------
peter.smith wrote:
> One thing that I don't think this will work for is wrapped secure entry functions. For example in secure state if I have a secure entry function `foo, __acle_foo` and I make another secure entry function `__wrap_foo, `__acle___wrap_foo` then we'll only want to create one SG veneer for foo which calls `__acle_foo` where `__acle_foo` is the renamed `__acle___wrap_foo`. The original `foo, __acle_foo` are renamed to `foo, __acle_foo` are renamed to `__real_foo` and `__acle___real_foo` (in theory `__acle___real_foo` is useless is the wrapped entry function is no longer an entry function.
>
> I think this will need quite a bit of faff to work properly. My suggestion is to search for `__acle___wrap` and error that wrapping secure entry functions is not supported. Could be worth adding support in a follow up patch.
>
> Another thing we could check for is an attempt to wrap a secure entry function with a function that isn't a secure entry point. I.e. we have `foo, __acle_foo` but we only have `__wrap_foo` and no `__acle__wrap_foo`.
I'll add support for this in a subsequent patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139092/new/
https://reviews.llvm.org/D139092
More information about the llvm-commits
mailing list