Module Name: src
Committed By: skrll
Date: Tue Jun 21 06:47:38 UTC 2022
Modified Files:
src/lib/csu/common: crt0-common.c
src/libexec/ld.elf_so: rtld.h
src/tests/lib/csu: h_ifunc_static.c
src/tests/libexec/ld.elf_so: t_ifunc.c
Log Message:
Wrap long #if defined(...) || ... and sort. NFCI.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/csu/common/crt0-common.c
cvs rdiff -u -r1.142 -r1.143 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/csu/h_ifunc_static.c
cvs rdiff -u -r1.10 -r1.11 src/tests/libexec/ld.elf_so/t_ifunc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/csu/common/crt0-common.c
diff -u src/lib/csu/common/crt0-common.c:1.25 src/lib/csu/common/crt0-common.c:1.26
--- src/lib/csu/common/crt0-common.c:1.25 Tue Jun 21 06:41:39 2022
+++ src/lib/csu/common/crt0-common.c Tue Jun 21 06:47:37 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0-common.c,v 1.25 2022/06/21 06:41:39 skrll Exp $ */
+/* $NetBSD: crt0-common.c,v 1.26 2022/06/21 06:47:37 skrll Exp $ */
/*
* Copyright (c) 1998 Christos Zoulas
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: crt0-common.c,v 1.25 2022/06/21 06:41:39 skrll Exp $");
+__RCSID("$NetBSD: crt0-common.c,v 1.26 2022/06/21 06:47:37 skrll Exp $");
#include <sys/types.h>
#include <sys/exec.h>
@@ -126,10 +126,15 @@ _finiarray(void)
}
}
-#if defined(__x86_64__) || defined(__powerpc__) || defined(__sparc__)
+#if \
+ defined(__powerpc__) || \
+ defined(__sparc__) || \
+ defined(__x86_64__)
#define HAS_IPLTA
static void fix_iplta(void) __noinline;
-#elif defined(__i386__) || defined(__arm__)
+#elif \
+ defined(__arm__) || \
+ defined(__i386__)
#define HAS_IPLT
static void fix_iplt(void) __noinline;
#endif
Index: src/libexec/ld.elf_so/rtld.h
diff -u src/libexec/ld.elf_so/rtld.h:1.142 src/libexec/ld.elf_so/rtld.h:1.143
--- src/libexec/ld.elf_so/rtld.h:1.142 Sat Dec 4 14:39:08 2021
+++ src/libexec/ld.elf_so/rtld.h Tue Jun 21 06:47:37 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.h,v 1.142 2021/12/04 14:39:08 skrll Exp $ */
+/* $NetBSD: rtld.h,v 1.143 2022/06/21 06:47:37 skrll Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -302,8 +302,12 @@ typedef struct Struct_Obj_Entry {
size_t fini_arraysz; /* # of entries in it */
/* IRELATIVE relocations */
size_t ifunc_remaining;
-#if defined(__sparc__) || defined(__powerpc__) || defined(__arm__) || \
- defined(__i386__) || defined(__x86_64__)
+#if \
+ defined(__arm__) || \
+ defined(__i386__) || \
+ defined(__powerpc__) || \
+ defined(__sparc__) || \
+ defined(__x86_64__)
#define IFUNC_NONPLT
/* On SPARC, the PLT variant is called JMP_IREL and counted above. */
size_t ifunc_remaining_nonplt;
Index: src/tests/lib/csu/h_ifunc_static.c
diff -u src/tests/lib/csu/h_ifunc_static.c:1.5 src/tests/lib/csu/h_ifunc_static.c:1.6
--- src/tests/lib/csu/h_ifunc_static.c:1.5 Mon Jun 13 12:55:06 2022
+++ src/tests/lib/csu/h_ifunc_static.c Tue Jun 21 06:47:38 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: h_ifunc_static.c,v 1.5 2022/06/13 12:55:06 martin Exp $ */
+/* $NetBSD: h_ifunc_static.c,v 1.6 2022/06/21 06:47:38 skrll Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,8 +29,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#if defined(__arm__) || defined(__i386__) || \
- defined(__x86_64__) || defined(__powerpc__) || defined(__sparc__)
+#if \
+ defined(__arm__) || \
+ defined(__i386__) || \
+ defined(__powerpc__) || \
+ defined(__sparc__) || \
+ defined(__x86_64__)
#include <stdlib.h>
#include <string.h>
Index: src/tests/libexec/ld.elf_so/t_ifunc.c
diff -u src/tests/libexec/ld.elf_so/t_ifunc.c:1.10 src/tests/libexec/ld.elf_so/t_ifunc.c:1.11
--- src/tests/libexec/ld.elf_so/t_ifunc.c:1.10 Mon Jun 13 19:49:33 2022
+++ src/tests/libexec/ld.elf_so/t_ifunc.c Tue Jun 21 06:47:38 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ifunc.c,v 1.10 2022/06/13 19:49:33 skrll Exp $ */
+/* $NetBSD: t_ifunc.c,v 1.11 2022/06/21 06:47:38 skrll Exp $ */
/*
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -35,7 +35,12 @@
#include "h_macros.h"
-#if defined(__arm__) || defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__sparc__)
+#if \
+ defined(__arm__) || \
+ defined(__i386__) || \
+ defined(__sparc__) || \
+ defined(__powerpc__) || \
+ defined(__x86_64__)
#define LINKER_SUPPORT 1
#else
#define LINKER_SUPPORT 0