arch/aarch64: Add support for FWK_CONSTRUCTOR functions
Certain SCP-firmware framework functionality (notifications, time,
buffered logging) requires initializers that run before arm_main(),
using the FWK_CONSTRUCTOR attribute.
Newlib provides __libc_init_array to iterate and call these, so add
this to arch_crt0.s, so long as Newlib is being used.
__libc_init_array calls _init, which is defined in crti, which is
linked by default by GCC but must be manually linked when using
Clang. Therefore add the path of crti to the Clang linker flags.
Add a note to aarch64.md about the Newlib requirement to use
FWK_CONSTRUCTOR attributes.
Signed-off-by:
Peter Hoyes <peter.hoyes@arm.com>
Loading
Please register or sign in to comment