aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-07-05 19:28:11 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-07-05 19:28:35 +0200
commit38cade0c461e58770749d7e8973f85c79532838a (patch)
tree0773d75774ff2e716f6578e5ec11c8fe9c91385a
parent9449a295ad7e30f3a787421cb22aaa475f950549 (diff)
downloadglibc-38cade0c461e58770749d7e8973f85c79532838a.tar
glibc-38cade0c461e58770749d7e8973f85c79532838a.tar.gz
glibc-38cade0c461e58770749d7e8973f85c79532838a.tar.bz2
glibc-38cade0c461e58770749d7e8973f85c79532838a.zip
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.
-rw-r--r--ChangeLog8
-rw-r--r--debug/Makefile7
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d134e1f29d..3bfd61a44a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-07-05 Florian Weimer <fweimer@redhat.com>
+ Carlos O'Donell <carlos@redhat.com>
+
+ * debug/Makefile (CFLAGS-stack_chk_fail_local.c): Remove
+ $(no-stack-protector). stack_chk_fail_local.c can be compiled
+ with stack protector enabled because there is no risk of infinite
+ recursion.
+
2018-07-05 Maciej W. Rozycki <macro@mips.com>
[BZ #19818]
diff --git a/debug/Makefile b/debug/Makefile
index c6f6feb0ec..506cebc3c4 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -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)