From 524a8ef2ad76af8ac049293d993a1856b0d888fb Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 26 Dec 2016 10:08:57 +0100 Subject: PLT avoidance for __stack_chk_fail [BZ #7065] Add a hidden __stack_chk_fail_local alias to libc.so, and make sure that on targets which use __stack_chk_fail, this does not introduce a local PLT reference into libc.so. --- debug/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debug/Makefile') diff --git a/debug/Makefile b/debug/Makefile index 84d3f92..ed7c397 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -53,6 +53,12 @@ routines = backtrace backtracesyms backtracesymsfd noophooks \ $(static-only-routines) static-only-routines := warning-nop stack_chk_fail_local +# Building the stack-protector failure routines with stack protection +# makes no sense. + +CFLAGS-stack_chk_fail.c = $(no-stack-protector) +CFLAGS-stack_chk_fail_local.c = $(no-stack-protector) + CFLAGS-backtrace.c = -fno-omit-frame-pointer CFLAGS-sprintf_chk.c = $(libio-mtsafe) CFLAGS-snprintf_chk.c = $(libio-mtsafe) -- cgit v1.1