summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-07-15 08:48:40 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-07-15 08:48:54 -0700
commit31e422ca9680bbe412aa56b23f058c10eaee7be8 (patch)
treea607224f4d7b43381ae58b4de26a1d2a03cab3cc
parentfaaee1f07ed25b2779bfd935ffb29f431b80d6d3 (diff)
x86_64: Undef SHADOW_STACK_POINTER_OFFSET last
Since SHADOW_STACK_POINTER_OFFSET is defined in jmp_buf-ssp.h, we must undef SHADOW_STACK_POINTER_OFFSET after including <jmp_buf-ssp.h>. * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Undef SHADOW_STACK_POINTER_OFFSET after including <jmp_buf-ssp.h>.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c9844826b0..89052e6a9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Undef
+ SHADOW_STACK_POINTER_OFFSET after including <jmp_buf-ssp.h>.
+
2018-07-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
H.J. Lu <hongjiu.lu@intel.com>
diff --git a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
index 7eb26fafca..5d2d275721 100644
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
@@ -19,15 +19,14 @@
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
#include <stap-probe.h>
+#include <sigaltstack-offsets.h>
+#include <jmp_buf-ssp.h>
/* Don't restore shadow stack register if shadow stack isn't enabled. */
#if !SHSTK_ENABLED
# undef SHADOW_STACK_POINTER_OFFSET
#endif
-#include <sigaltstack-offsets.h>
-#include <jmp_buf-ssp.h>
-
.section .rodata.str1.1,"aMS",@progbits,1
.type longjmp_msg,@object
longjmp_msg: