TZ: wrong veneer code is generated for __gnu_cmse_nonsecure_call when code is too far off
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I encountered an issue with arm-none-eabi-gcc related to trustzone on M33 build.
(on gcc-arm-
My code is compiled for thumb2 with -mthumb and -mcmse.
When the non-secure function, which I call from secure code is too far away,
I observe that the linker generates veneer code which seems to be ARM code not THUMB code.
This caused my system to crash with a UsageFault.
Generated code from Compiler/linker for those long calls is for example:
1001d090: f002 eec6 blx 1001fe20 <____gnu_
that is ARM code not THUMB2 code and caused the crash.
when I place the code closer together I do get:
180447ca: f7ff ff45 bl 18044658 <__gnu_
that is proper THUMB2 code as expected.
BR
Hans
Hi,
Could you please provide a reproducer for the mentioned issue.
Regards,
Srinath.