[0/2,ipa,Arm] Fix cloning of 'cmse_nonsecure_entry' functions
mbox series

Message ID 712b0e9d-0d6a-c6de-07bf-f70799d0417a@arm.com
Headers show
  • Fix cloning of 'cmse_nonsecure_entry' functions
Related show


Andre Vieira (lists) Oct. 8, 2019, 3:20 p.m. UTC

This patch series is aimed at fixing an issue when cloning a function 
with 'cmse_nonsecure_entry' attribute.
Currently if gcc determines to clone a function with this attribute, 
both the cloned and original declarations will be compiled as nonsecure 
entry functions.  The linker eventually complains about a non-global 
cmse entry function and errors out.

It is legal to clone these functions, since the clone will only be used 
directly by the same translation unit as the original cmse entry 
function.  However, the clones should not be marked as entry functions. 
So in patch 1 I'll add a target hook that allows each target to sanitize 
the cloned declaration's attributes and in patch 2 I'll make the arm's 
implementation of it remove 'cmse_nonsecure_entry' from the cloned 
declaration's attribute list.

Andre Vieira (2)
[Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes
remove cmse_nonsecure_entry

Bootstrapped the series on x86_64 and built arm-none-eabi, running the 
cmse testsuite for armv8-m.main and armv8-m.base.