summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2022-05-24 17:15:24 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2022-05-24 17:15:24 +0000
commit08693a354865b291d7e3a3d44f1f8724d0b950a6 (patch)
tree0460f5c507330a7f2033559ee018c29392d67351 /sys
parent1d169e7b4bbe64bfcb65fc1c0ab44458167d6c09 (diff)
Address the clang 13 "changed binding to STB_WEAK" warning on arm (32bit):
* add _?ENTRY_NB to arm/asm.h * make sure ld.so's arm asm bits see the same includes as libc * switch libc's arm bits to the generic DEFS.h * switch arm ASM bits from ENTRY to ENTRY_NB as necessary ok kettenis@ miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/include/asm.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/arm/include/asm.h b/sys/arch/arm/include/asm.h
index 1fc98c14e88..27e55be5b6f 100644
--- a/sys/arch/arm/include/asm.h
+++ b/sys/arch/arm/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.10 2022/02/24 07:08:21 guenther Exp $ */
+/* $OpenBSD: asm.h,v 1.11 2022/05/24 17:15:22 guenther Exp $ */
/* $NetBSD: asm.h,v 1.4 2001/07/16 05:43:32 matt Exp $ */
/*
@@ -61,8 +61,11 @@
*/
#define _ASM_TYPE_FUNCTION #function
#define _ASM_TYPE_OBJECT #object
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
+
+/* NB == No Binding: use .globl or .weak as necessary */
+#define _ENTRY_NB(x) \
+ .text; _ALIGN_TEXT; .type x,_ASM_TYPE_FUNCTION; x:
+#define _ENTRY(x) .globl x; _ENTRY_NB(x)
#if defined(PROF) || defined(GPROF)
# define _PROF_PROLOGUE \
@@ -73,6 +76,7 @@
#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
+#define ENTRY_NB(y) _ENTRY_NB(y); _PROF_PROLOGUE
#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
#define END(y) .size y, . - y