BUILD: debug: mark the __start_mem_stats/__stop_mem_stats symbols as weak

Building with clang and DEBUG_MEM_STATS shows the following warnings:

  warning: __start_mem_stats changed binding to STB_WEAK [-Wsource-mgr]
  warning: __stop_mem_stats changed binding to STB_WEAK [-Wsource-mgr]

The reason is that the symbols are declared using ".globl" while they
are also referenced as __attribute__((weak)) elsewhere. It turns out
that a weak symbol is implicitly a global one and that the two classes
are exclusive, thus it may confuse the linker. Better fix this.

This may be backported where the patch applies.

(cherry picked from commit b12966af1006be8d4438ee1ca39c2541a1f2a4f9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 441988a6efd97fcfa50f98fc4b1275b98e998b3c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed