MINOR: initcall: Don't forget to define the __start/stop_init_##stg symbols.
When creating a new initcall, don't forget to define the symbols, as it may
not be done automatically and that would lead to undefined symbols.
This should be backported to 1.9.
diff --git a/include/common/initcall.h b/include/common/initcall.h
index cf3febb..6da752c 100644
--- a/include/common/initcall.h
+++ b/include/common/initcall.h
@@ -98,7 +98,11 @@
* as a pointer (args are cast to (void*)). Do not use this macro directly,
* use INITCALL{0..3}() instead.
*/
+#define __GLOBL1(sym) __asm__(".globl " #sym)
+#define __GLOBL(sym) __GLOBL1(sym)
#define __DECLARE_INITCALL(stg, linenum, function, a1, a2, a3) \
+ __GLOBL(__start_init_##stg ); \
+ __GLOBL(__stop_init_##stg ); \
static const struct initcall *__initcb_##linenum \
__attribute__((__used__,HA_SECTION(stg))) = \
(stg < STG_SIZE) ? &(const struct initcall) { \
@@ -108,6 +112,7 @@
.arg3 = (void *)(a3), \
} : NULL
+
#else // USE_OBSOLETE_LINKER
/* Declare a static constructor function to register a static descriptor for