diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 2e103c7804b1..a9bfaa9ef7c4 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -259,7 +259,7 @@ sysinit_tslog_shim(const void * data) sysinit_tslog_shim, \ &uniquifier ## _sys_init_tslog \ }; \ - DATA_SET(sysinit_set,uniquifier ## _sys_init) + DATA_WSET(sysinit_set,uniquifier ## _sys_init) #else #define C_SYSINIT(uniquifier, subsystem, order, func, ident) \ static struct sysinit uniquifier ## _sys_init = { \ @@ -268,7 +268,7 @@ sysinit_tslog_shim(const void * data) func, \ (ident) \ }; \ - DATA_SET(sysinit_set,uniquifier ## _sys_init) + DATA_WSET(sysinit_set,uniquifier ## _sys_init) #endif #define SYSINIT(uniquifier, subsystem, order, func, ident) \ @@ -285,7 +285,7 @@ sysinit_tslog_shim(const void * data) func, \ (ident) \ }; \ - DATA_SET(sysuninit_set,uniquifier ## _sys_uninit) + DATA_WSET(sysuninit_set,uniquifier ## _sys_uninit) #define SYSUNINIT(uniquifier, subsystem, order, func, ident) \ C_SYSUNINIT(uniquifier, subsystem, order, \ diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h index 01d0bff98410..9f49b802887b 100644 --- a/sys/sys/linker_set.h +++ b/sys/sys/linker_set.h @@ -56,12 +56,13 @@ * Private macros, not to be used outside this header file. */ #ifdef __GNUCLIKE___SECTION -#define __MAKE_SET(set, sym) \ +#define __MAKE_SET_QV(set, sym, qv) \ __GLOBL(__CONCAT(__start_set_,set)); \ __GLOBL(__CONCAT(__stop_set_,set)); \ - static void const * __MAKE_SET_CONST \ + static void const * qv \ __set_##set##_sym_##sym __section("set_" #set) \ __used = &(sym) +#define __MAKE_SET(set, sym) __MAKE_SET_QV(set, sym, __MAKE_SET_CONST) #else /* !__GNUCLIKE___SECTION */ #error this file needs to be ported to your compiler #endif /* __GNUCLIKE___SECTION */ @@ -71,6 +72,7 @@ */ #define TEXT_SET(set, sym) __MAKE_SET(set, sym) #define DATA_SET(set, sym) __MAKE_SET(set, sym) +#define DATA_WSET(set, sym) __MAKE_SET_QV(set, sym, ) #define BSS_SET(set, sym) __MAKE_SET(set, sym) #define ABS_SET(set, sym) __MAKE_SET(set, sym) #define SET_ENTRY(set, sym) __MAKE_SET(set, sym)