From dcb677c3d3290c18cfdbc54d2f8fcf0279c06206 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Sat, 5 Aug 2023 14:12:06 +0800 Subject: tools/nolibc: stackprotector.h: make __stack_chk_init static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows to generate smaller text/data/dec size. As the _start_c() function added by crt.h, __stack_chk_init() is called from _start_c() instead of the assembly _start. So, it is able to mark it with static now. Reviewed-by: Thomas Weißschuh Signed-off-by: Zhangjin Wu Signed-off-by: Willy Tarreau --- tools/include/nolibc/crt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/include/nolibc/crt.h') diff --git a/tools/include/nolibc/crt.h b/tools/include/nolibc/crt.h index 32e128b0fb62..a5f33fef1672 100644 --- a/tools/include/nolibc/crt.h +++ b/tools/include/nolibc/crt.h @@ -10,7 +10,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak)); -void __stack_chk_init(void); +static void __stack_chk_init(void); static void exit(int); void _start_c(long *sp) -- cgit v1.2.3