]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
BZ #15754: Fix test case for ARM.
authorCarlos O'Donell <carlos@redhat.com>
Mon, 23 Sep 2013 05:44:38 +0000 (01:44 -0400)
committerAllan McRae <allan@archlinux.org>
Fri, 25 Oct 2013 13:56:45 +0000 (23:56 +1000)
Statically built binaries use __pointer_chk_guard_local,
while dynamically built binaries use __pointer_chk_guard.
Provide the right definition depending on the test case
we are building.

ChangeLog
elf/Makefile
sysdeps/generic/stackguard-macros.h

index 5be5ee59d152ae945a06a807be542e2a00689f8c..5a5a2b5a7d9cf06b3afc321c06391e2e933a3e7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-09-23  Carlos O'Donell  <carlos@redhat.com>
+
+       [BZ #15754]
+       * sysdeps/generic/stackguard-macros.h: If PTRGUARD_LOCAL use
+       __pointer_chk_guard_local, otherwise __pointer_chk_guard.
+       * elf/Makefile: Define CFLAGS-tst-ptrguard1-static.c.
+
 2013-09-23  Carlos O'Donell  <carlos@redhat.com>
 
        [BZ #15754]
index 98834f4cb7f1895ae81bcc0889226e51bc766738..9e21c27e0390a73c954d4edcb35f726eea61a2ef 100644 (file)
@@ -1019,6 +1019,9 @@ tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
 
 tst-ptrguard1-ARGS = --command "$(host-test-program-cmd) --child"
+# When built statically, the pointer guard interface uses
+# __pointer_chk_guard_local.
+CFLAGS-tst-ptrguard1-static.c = -DPTRGUARD_LOCAL
 tst-ptrguard1-static-ARGS = --command "$(objpfx)tst-ptrguard1-static --child"
 
 $(objpfx)tst-leaks1: $(libdl)
index 4fa3d96f796e98fd19f14f4e99d38c3a9f95455e..b4a6b23ff87dd9b1425349ffe269c76b3cd29543 100644 (file)
@@ -3,5 +3,10 @@
 extern uintptr_t __stack_chk_guard;
 #define STACK_CHK_GUARD __stack_chk_guard
 
+#ifdef PTRGUARD_LOCAL
 extern uintptr_t __pointer_chk_guard_local;
-#define POINTER_CHK_GUARD __pointer_chk_guard_local
+# define POINTER_CHK_GUARD __pointer_chk_guard_local
+#else
+extern uintptr_t __pointer_chk_guard;
+# define POINTER_CHK_GUARD __pointer_chk_guard
+#endif