summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2023-12-11 22:24:17 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2023-12-11 22:24:17 +0000
commit334c7eb36543639c3f0534361f5e815df7e0a6fd (patch)
tree98ba4d9ef42fe85fa88a62802bfe4794c760a130
parent0de6004f3c4b6c0d9c50014c604793d658cd1421 (diff)
Make sure the syscall table entries are aligned on a 4-byte boundary.
Required for strict-alignment architectures and a good idea on others. ok deraadt@
-rw-r--r--lib/libc/arch/DEFS.h3
-rw-r--r--lib/libc/arch/alpha/SYS.h3
-rw-r--r--lib/libc/arch/hppa/SYS.h3
-rw-r--r--lib/libc/arch/i386/DEFS.h3
-rw-r--r--lib/libc/arch/m88k/DEFS.h3
-rw-r--r--lib/libc/arch/mips64/SYS.h3
-rw-r--r--lib/libc/arch/powerpc64/DEFS.h3
-rw-r--r--lib/libc/arch/riscv64/DEFS.h3
-rw-r--r--lib/libc/arch/sh/SYS.h3
9 files changed, 18 insertions, 9 deletions
diff --git a/lib/libc/arch/DEFS.h b/lib/libc/arch/DEFS.h
index 472b530b240..38cfcdec010 100644
--- a/lib/libc/arch/DEFS.h
+++ b/lib/libc/arch/DEFS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: DEFS.h,v 1.3 2023/12/11 03:05:15 deraadt Exp $ */
+/* $OpenBSD: DEFS.h,v 1.4 2023/12/11 22:24:15 kettenis Exp $ */
/*
* Copyright (c) 2015,2018,2021 Philip Guenther <guenther@openbsd.org>
*
@@ -72,6 +72,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",_PROGBITS; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;
diff --git a/lib/libc/arch/alpha/SYS.h b/lib/libc/arch/alpha/SYS.h
index 62adccb89b5..d7e3f79acf5 100644
--- a/lib/libc/arch/alpha/SYS.h
+++ b/lib/libc/arch/alpha/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.17 2023/12/10 16:45:50 deraadt Exp $ */
+/* $OpenBSD: SYS.h,v 1.18 2023/12/11 22:24:15 kettenis Exp $ */
/* $NetBSD: SYS.h,v 1.4 1996/10/17 03:03:53 cgd Exp $ */
/*
@@ -58,6 +58,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;
diff --git a/lib/libc/arch/hppa/SYS.h b/lib/libc/arch/hppa/SYS.h
index 460157c9891..2e78cff6316 100644
--- a/lib/libc/arch/hppa/SYS.h
+++ b/lib/libc/arch/hppa/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.25 2023/12/11 02:30:36 deraadt Exp $ */
+/* $OpenBSD: SYS.h,v 1.26 2023/12/11 22:24:15 kettenis Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -69,6 +69,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits !\
+ .p2align 2 !\
.long label !\
.long sysno !\
.popsection
diff --git a/lib/libc/arch/i386/DEFS.h b/lib/libc/arch/i386/DEFS.h
index c8ae4a29beb..07efc8fa8eb 100644
--- a/lib/libc/arch/i386/DEFS.h
+++ b/lib/libc/arch/i386/DEFS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: DEFS.h,v 1.4 2023/12/10 16:45:51 deraadt Exp $ */
+/* $OpenBSD: DEFS.h,v 1.5 2023/12/11 22:24:15 kettenis Exp $ */
/*
* Copyright (c) 2017 Philip Guenther <guenther@openbsd.org>
*
@@ -50,6 +50,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;
diff --git a/lib/libc/arch/m88k/DEFS.h b/lib/libc/arch/m88k/DEFS.h
index 804636ee852..5260e40bd21 100644
--- a/lib/libc/arch/m88k/DEFS.h
+++ b/lib/libc/arch/m88k/DEFS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: DEFS.h,v 1.4 2023/12/10 16:45:51 deraadt Exp $ */
+/* $OpenBSD: DEFS.h,v 1.5 2023/12/11 22:24:15 kettenis Exp $ */
#include <machine/asm.h>
@@ -26,6 +26,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;
diff --git a/lib/libc/arch/mips64/SYS.h b/lib/libc/arch/mips64/SYS.h
index c9ac6b24cf3..16b5a6fda7e 100644
--- a/lib/libc/arch/mips64/SYS.h
+++ b/lib/libc/arch/mips64/SYS.h
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: SYS.h,v 1.13 2023/12/10 16:45:51 deraadt Exp $
+ * $OpenBSD: SYS.h,v 1.14 2023/12/11 22:24:16 kettenis Exp $
*/
#include <sys/syscall.h>
@@ -127,6 +127,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;
diff --git a/lib/libc/arch/powerpc64/DEFS.h b/lib/libc/arch/powerpc64/DEFS.h
index 3b8c9332061..9c90a1b1d92 100644
--- a/lib/libc/arch/powerpc64/DEFS.h
+++ b/lib/libc/arch/powerpc64/DEFS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: DEFS.h,v 1.2 2023/12/10 16:45:52 deraadt Exp $ */
+/* $OpenBSD: DEFS.h,v 1.3 2023/12/11 22:24:16 kettenis Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -70,6 +70,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;
diff --git a/lib/libc/arch/riscv64/DEFS.h b/lib/libc/arch/riscv64/DEFS.h
index a2c61dda980..09bc27befb6 100644
--- a/lib/libc/arch/riscv64/DEFS.h
+++ b/lib/libc/arch/riscv64/DEFS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: DEFS.h,v 1.2 2023/12/10 16:45:52 deraadt Exp $ */
+/* $OpenBSD: DEFS.h,v 1.3 2023/12/11 22:24:16 kettenis Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -60,6 +60,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;
diff --git a/lib/libc/arch/sh/SYS.h b/lib/libc/arch/sh/SYS.h
index cd5dbeaaf51..cb3fd7ef1e6 100644
--- a/lib/libc/arch/sh/SYS.h
+++ b/lib/libc/arch/sh/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.14 2023/12/10 16:45:52 deraadt Exp $ */
+/* $OpenBSD: SYS.h,v 1.15 2023/12/11 22:24:16 kettenis Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -87,6 +87,7 @@
#define PINSYSCALL(sysno, label) \
.pushsection .openbsd.syscalls,"",@progbits; \
+ .p2align 2; \
.long label; \
.long sysno; \
.popsection;