]> 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)
committerCarlos O'Donell <carlos@redhat.com>
Mon, 23 Sep 2013 05:44:38 +0000 (01:44 -0400)
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 5972ae01f9be4132107d96ba99a683881b4b7884..25664f0ad8613a707295947f07697d72739f5871 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +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.
+
        [BZ #15754]
        * elf/Makefile (tests): Add tst-ptrguard1.
        (tests-static): Add tst-ptrguard1-static.
index cb8da9398aa8638c7fa74736d763c9d91082c1c5..27d249b2ff49220b5e9f5ec3677e5318440361b6 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