diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 1d1fe2965c69..ff461db9ec2e 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -563,8 +563,8 @@ #endif /* __STDC__ */ #endif /* __GNUC__ */ -#define __GLOBL1(sym) __asm__(".globl " #sym) -#define __GLOBL(sym) __GLOBL1(sym) +#define __GLOBL(sym) __asm__(".globl " __XSTRING(sym)) +#define __WEAK(sym) __asm__(".weak " __XSTRING(sym)) #if defined(__GNUC__) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h index 6169a3499dad..f957858ada04 100644 --- a/sys/sys/linker_set.h +++ b/sys/sys/linker_set.h @@ -60,8 +60,8 @@ */ #ifdef __GNUCLIKE___SECTION #define __MAKE_SET_QV(set, sym, qv) \ - __GLOBL(__CONCAT(__start_set_,set)); \ - __GLOBL(__CONCAT(__stop_set_,set)); \ + __WEAK(__CONCAT(__start_set_,set)); \ + __WEAK(__CONCAT(__stop_set_,set)); \ static void const * qv \ __set_##set##_sym_##sym __section("set_" #set) \ __nosanitizeaddress \