Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/arch/amd64/include Pull up following revision(s) (req...



details:   https://anonhg.NetBSD.org/src/rev/632317f7b566
branches:  netbsd-8
changeset: 449939:632317f7b566
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Mar 29 19:39:06 2019 +0000

description:
Pull up following revision(s) (requested by rin in ticket #1220):

        sys/arch/amd64/include/param.h: revision 1.30

Bump STACK_ALIGNBYTES to (16 - 1) to satisfy requirement by AMD64
System V ABI in kernel level. This is because

(1) for LLDB, we want to bypass libc/csu (and therefore manual stack
     alignment in _start), and
(2) rtld in glibc >= 2.23 for Linux/x86_64 requires it.

Fix SEGV for Linux/x86_64 binaries with glibc >= 2.23, reported as

PR port-amd64/54052.

diffstat:

 sys/arch/amd64/include/param.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 9df9df238879 -r 632317f7b566 sys/arch/amd64/include/param.h
--- a/sys/arch/amd64/include/param.h    Thu Mar 21 14:27:47 2019 +0000
+++ b/sys/arch/amd64/include/param.h    Fri Mar 29 19:39:06 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.21.6.3 2018/04/11 14:43:23 martin Exp $    */
+/*     $NetBSD: param.h,v 1.21.6.4 2019/03/29 19:39:06 martin Exp $    */
 
 #ifdef __x86_64__
 
@@ -19,6 +19,13 @@
 
 #define ALIGNED_POINTER(p,t)   1
 
+/*
+ * Align stack as required by AMD64 System V ABI. This is because
+ * (1) we want to bypass libc/csu in LLDB, and
+ * (2) rtld in glibc >= 2.23 for Linux/x86_64 requires it.
+ */
+#define STACK_ALIGNBYTES       (16 - 1)
+
 #define ALIGNBYTES32           (sizeof(int) - 1)
 #define ALIGN32(p)             (((u_long)(p) + ALIGNBYTES32) &~ALIGNBYTES32)
 



Home | Main Index | Thread Index | Old Index