diff --git a/include/haproxy/bug.h b/include/haproxy/bug.h index 54b41ee42..54536ff86 100644 --- a/include/haproxy/bug.h +++ b/include/haproxy/bug.h @@ -273,8 +273,8 @@ struct mem_stats { .func = __func__, \ }, \ }; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __x * __y); \ calloc(__x,__y); \ @@ -296,8 +296,8 @@ struct mem_stats { .func = __func__, \ }, \ }; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ if (__x) { \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __y); \ @@ -314,8 +314,8 @@ struct mem_stats { .func = __func__, \ }, \ }; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ if (__builtin_constant_p((x)) || __builtin_constant_p(*(x))) { \ HA_LINK_ERROR(call_to_ha_free_attempts_to_free_a_constant); \ } \ @@ -335,8 +335,8 @@ struct mem_stats { .func = __func__, \ }, \ }; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __x); \ malloc(__x); \ @@ -352,8 +352,8 @@ struct mem_stats { .func = __func__, \ }, \ }; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __y); \ realloc(__x,__y); \ @@ -369,8 +369,8 @@ struct mem_stats { .func = __func__, \ }, \ }; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __y); \ strdup(__x); \ diff --git a/include/haproxy/pool.h b/include/haproxy/pool.h index 1af32ae04..8fd14b966 100644 --- a/include/haproxy/pool.h +++ b/include/haproxy/pool.h @@ -263,8 +263,8 @@ static inline void *pool_get_from_cache(struct pool_head *pool, const void *call }, \ }; \ _.extra = __pool; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ if (__ptr) { \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __pool->size); \ @@ -283,8 +283,8 @@ static inline void *pool_get_from_cache(struct pool_head *pool, const void *call }, \ }; \ _.extra = __pool; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __x); \ __pool_alloc(__pool, 0); \ @@ -301,8 +301,8 @@ static inline void *pool_get_from_cache(struct pool_head *pool, const void *call }, \ }; \ _.extra = __pool; \ - HA_WEAK("__start_mem_stats"); \ - HA_WEAK("__stop_mem_stats"); \ + HA_WEAK(__start_mem_stats); \ + HA_WEAK(__stop_mem_stats); \ _HA_ATOMIC_INC(&_.calls); \ _HA_ATOMIC_ADD(&_.size, __x); \ __pool_alloc(__pool, POOL_F_MUST_ZERO); \