BUILD: initcall: mark the __start_i_* symbols as weak, not global

Just like for previous fix, these symbols are marked ".globl" during
their declaration, but their later mention uses __attribute__((weak)),
so it's better to only use ".weak" during the declaration so that the
symbol's class does not change.

No need to backport this unless someone reports build issues.
This commit is contained in:
Willy Tarreau 2022-04-13 17:12:20 +02:00
parent b12966af10
commit 2a06e248f5

View File

@ -96,7 +96,7 @@ struct initcall {
* as a pointer (args are cast to (void*)). Do not use this macro directly,
* use INITCALL{0..3}() instead.
*/
#define __HA_GLOBL1(sym) __asm__(".globl " #sym)
#define __HA_GLOBL1(sym) __asm__(".weak " #sym)
#define __HA_GLOBL(sym) __HA_GLOBL1(sym)
#define __DECLARE_INITCALL(stg, linenum, function, a1, a2, a3) \
__HA_GLOBL(__start_i_##stg ); \