Make sure the syscall table entries are aligned on a 4-byte boundary.
authorderaadt <deraadt@openbsd.org>
Mon, 11 Dec 2023 22:29:23 +0000 (22:29 +0000)
committerderaadt <deraadt@openbsd.org>
Mon, 11 Dec 2023 22:29:23 +0000 (22:29 +0000)
Required for strict-alignment architectures and a good idea on others.
same as kettenis commit to libc

13 files changed:
libexec/ld.so/aarch64/SYS.h
libexec/ld.so/alpha/SYS.h
libexec/ld.so/amd64/SYS.h
libexec/ld.so/arm/SYS.h
libexec/ld.so/hppa/SYS.h
libexec/ld.so/i386/SYS.h
libexec/ld.so/m88k/SYS.h
libexec/ld.so/mips64/SYS.h
libexec/ld.so/powerpc/SYS.h
libexec/ld.so/powerpc64/SYS.h
libexec/ld.so/riscv64/SYS.h
libexec/ld.so/sh/SYS.h
libexec/ld.so/sparc64/SYS.h

index c308acf..4fcae52 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.6 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.7 2023/12/11 22:29:23 deraadt Exp $ */
 
 /*
  * Copyright (c) 2016 Dale Rahn
@@ -31,6 +31,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 3d0d140..62b4d67 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.4 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.5 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 2001 Niklas Hallqvist
@@ -63,6 +63,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index e160da9..51c055e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.4 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.5 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 2002,2004 Dale Rahn
@@ -32,6 +32,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index faa5804..4678615 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.5 2023/12/11 03:05:17 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.6 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 2004 Dale Rahn
@@ -31,6 +31,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",%progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 0770783..403daa8 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.2 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.3 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 2004 Michael Shalayeff
@@ -35,6 +35,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             !\
+       .p2align 2                                              !\
        .long label                                             !\
        .long sysno                                             !\
        .popsection
index b714c50..7d09eb5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.2 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.3 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 2002 Dale Rahn
@@ -32,6 +32,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index c1528b2..0db37ef 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.5 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.6 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 2013 Miodrag Vallat.
@@ -46,6 +46,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 1dbc8a7..1d5764f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.2 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.3 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 1998-2002 Opsycon AB, Sweden.
@@ -31,6 +31,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 9da6701..ba2a0f9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.5 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.6 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 1999 Dale Rahn
@@ -31,6 +31,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 7671f36..a7c3241 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.3 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.4 2023/12/11 22:29:24 deraadt Exp $ */
 
 /*
  * Copyright (c) 1999 Dale Rahn
@@ -31,6 +31,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 3d6537f..6bd81b7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.2 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.3 2023/12/11 22:29:25 deraadt Exp $ */
 
 /*
  * Copyright (c) 2016 Dale Rahn <drahn@openbsd.org>
@@ -31,6 +31,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 4f93502..df4333c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.3 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.4 2023/12/11 22:29:25 deraadt Exp $ */
 
 /*
  * Copyright (c) 2006 Dale Rahn
@@ -31,6 +31,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection
index 7a29f2b..fa7e8a9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.5 2023/12/10 16:45:50 deraadt Exp $ */
+/*     $OpenBSD: SYS.h,v 1.6 2023/12/11 22:29:25 deraadt Exp $ */
 /*     $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $       */
 
 /*
@@ -70,6 +70,7 @@
 
 #define PINSYSCALL(sysno, label)                               \
        .pushsection .openbsd.syscalls,"",@progbits             ;\
+       .p2align 2                                              ;\
        .long label                                             ;\
        .long sysno                                             ;\
        .popsection