]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: debug: mark the __start_mem_stats/__stop_mem_stats symbols as weak
authorWilly Tarreau <w@1wt.eu>
Wed, 13 Apr 2022 15:09:45 +0000 (17:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 Apr 2022 17:13:49 +0000 (19:13 +0200)
commitb12966af1006be8d4438ee1ca39c2541a1f2a4f9
treed4eff72519958d08dadd833bd2e637a3ece62c53
parentbc964bd1aecab858bb74a24240cd7b2836e229ab
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.
include/haproxy/bug.h