From 2a06e248f5c8b7c86c7dd48eed7f6d5e87288457 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 13 Apr 2022 17:12:20 +0200 Subject: [PATCH] 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. --- include/haproxy/initcall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/initcall.h b/include/haproxy/initcall.h index 1ffbabf57..0692d27d6 100644 --- a/include/haproxy/initcall.h +++ b/include/haproxy/initcall.h @@ -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 ); \