diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-12-16 09:25:44 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-12-16 09:25:44 +0000 |
commit | aeb7b2d08326cae53cf64a9886f616eff5a97522 (patch) | |
tree | a9ee5e7fc4aee1bf1f91da1bcafa125acc4f7c2b | |
parent | 4a65536c47d199654d22f0444b7be0804af8da19 (diff) |
Don't use _libc_ prefix when referencing "builtin" symbols with clang.
Slightly tweaked diff from guenther@
-rw-r--r-- | lib/libc/arch/arm/DEFS.h | 7 | ||||
-rw-r--r-- | lib/libc/arch/arm/string/bzero.S | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/libc/arch/arm/DEFS.h b/lib/libc/arch/arm/DEFS.h index 4220bdf2d37..a758b0f9ea0 100644 --- a/lib/libc/arch/arm/DEFS.h +++ b/lib/libc/arch/arm/DEFS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: DEFS.h,v 1.2 2017/11/29 05:13:57 guenther Exp $ */ +/* $OpenBSD: DEFS.h,v 1.3 2017/12/16 09:25:43 kettenis Exp $ */ /* * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> * @@ -38,12 +38,17 @@ * END_BUILTIN(x) If compiling with clang, then just END() and * mark it .protected, else be like END_STRONG(); * for clang builtins like memcpy + * If a 'BUILTIN' function needs be referenced by other ASM code, then use + * _BUILTIN(x) If compiled with clang, then just x, otherwise + * _HIDDEN(x) */ #define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x)) #define END_WEAK(x) END_STRONG(x); .weak x #ifdef __clang__ #define END_BUILTIN(x) END(x); .protected x +#define _BUILTIN(x) x #else #define END_BUILTIN(x) END_STRONG(x) +#define _BUILTIN(x) _HIDDEN(x) #endif diff --git a/lib/libc/arch/arm/string/bzero.S b/lib/libc/arch/arm/string/bzero.S index 4fe7e9b7561..ff7fb97221e 100644 --- a/lib/libc/arch/arm/string/bzero.S +++ b/lib/libc/arch/arm/string/bzero.S @@ -1,4 +1,4 @@ -/* $OpenBSD: bzero.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ +/* $OpenBSD: bzero.S,v 1.6 2017/12/16 09:25:43 kettenis Exp $ */ /* $NetBSD: bzero.S,v 1.2 2001/07/16 05:50:06 matt Exp $ */ /*- @@ -35,5 +35,5 @@ ENTRY(bzero) mov r2, r1 mov r1, #0 - b _HIDDEN(memset) + b _BUILTIN(memset) END_WEAK(bzero) |