1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Compile debug/stack_chk_fail_local.c with stack protector

The resulting object file is statically linked into applications, so
it is desirable to have (formal) stack protector coverage there.
This commit is contained in:
Florian Weimer
2018-07-05 19:28:11 +02:00
parent 9449a295ad
commit 38cade0c46
2 changed files with 13 additions and 2 deletions

View File

@@ -58,10 +58,13 @@ static-only-routines := warning-nop stack_chk_fail_local
elide-routines.o := stack_chk_fail_local
# Building the stack-protector failure routines with stack protection
# makes no sense.
# is not required since we have already failed a stack check and are
# exiting the process. However, the local aliases which jump to the
# real routines should still be compiled with stack protection
# (stack_chk_fail_local.c), so that the statically linked parts of the
# library have the expected flags.
CFLAGS-stack_chk_fail.c += $(no-stack-protector)
CFLAGS-stack_chk_fail_local.c += $(no-stack-protector)
CFLAGS-backtrace.c += -fno-omit-frame-pointer -funwind-tables
CFLAGS-sprintf_chk.c += $(libio-mtsafe)