From ff0f81e9c0f044e9414380fcf197a58d31da40cf Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Fri, 10 Apr 2026 13:14:04 +0200 Subject: [PATCH] corrects bootup code not tested if tls actually works --- port/moonlight/src/bootup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/port/moonlight/src/bootup.c b/port/moonlight/src/bootup.c index 4c1c61f..af34dcd 100644 --- a/port/moonlight/src/bootup.c +++ b/port/moonlight/src/bootup.c @@ -55,6 +55,10 @@ EXTERN_C void _exit(int exit_code) __attribute__ ((noreturn,noinline,weak)); // Standard entry point, no arguments. extern int main(void); +#ifdef __THREAD_LOCAL_STORAGE +EXTERN_C void _set_tls(uint8_t*) __attribute__ ((noreturn,section(".text.boot"))); +#endif + #if defined BOOTUP_SMP_ENABLED EXTERN_C void _secondary_initialize(void) __attribute__ ((noreturn,section(".text.boot"))); EXTERN_C void _secondary_ipi_trap(void) __attribute__ ((naked,noreturn,section(".text.boot")));