From: kettenis Date: Sat, 16 Dec 2017 09:25:43 +0000 (+0000) Subject: Don't use _libc_ prefix when referencing "builtin" symbols with clang. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fef8d7070320f15f60fec8186ba967ab818ca6a9;p=openbsd Don't use _libc_ prefix when referencing "builtin" symbols with clang. Slightly tweaked diff from guenther@ --- 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 * @@ -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)