summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debug/Makefile2
-rw-r--r--debug/stack_chk_fail_local.c46
-rw-r--r--elf/Makefile1
3 files changed, 2 insertions, 47 deletions
diff --git a/debug/Makefile b/debug/Makefile
index cd4975c35b..136c9a1eae 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -51,7 +51,7 @@ routines = backtrace backtracesyms backtracesymsfd noophooks \
explicit_bzero_chk \
stack_chk_fail fortify_fail \
$(static-only-routines)
-static-only-routines := warning-nop stack_chk_fail_local
+static-only-routines := warning-nop
# Building the stack-protector failure routines with stack protection
# makes no sense.
diff --git a/debug/stack_chk_fail_local.c b/debug/stack_chk_fail_local.c
deleted file mode 100644
index eb0a759c4b..0000000000
--- a/debug/stack_chk_fail_local.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (C) 2005-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Lesser General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The GNU Lesser General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- Note that people who make modified versions of this file are not
- obligated to grant this special exception for their modified
- versions; it is their choice whether to do so. The GNU Lesser
- General Public License gives permission to release a modified
- version without this exception; this exception also makes it
- possible to release a modified version which carries forward this
- exception.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/cdefs.h>
-
-extern void __stack_chk_fail (void) __attribute__ ((noreturn));
-
-/* On some architectures, this helps needless PIC pointer setup
- that would be needed just for the __stack_chk_fail call. */
-
-void __attribute__ ((noreturn)) attribute_hidden
-__stack_chk_fail_local (void)
-{
- __stack_chk_fail ();
-}
diff --git a/elf/Makefile b/elf/Makefile
index e758a4c960..fb2d855ba3 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -369,6 +369,7 @@ tests-internal += tst-_dl_addr_inside_object
tests-pie += tst-_dl_addr_inside_object
$(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
+LDFLAGS-tst-_dl_addr_inside_object = $(dummy-stack-chk-fail)
endif
# By default tst-linkall-static should try to use crypt routines to test