From: guenther Date: Wed, 7 Dec 2022 23:25:59 +0000 (+0000) Subject: _C_LABEL() and _ASM_LABEL() are no longer useful in the "everything X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6a684a0448534bbab8058f7b12f094dd9837d5d2;p=openbsd _C_LABEL() and _ASM_LABEL() are no longer useful in the "everything is ELF" world. Eliminate use of them in powerpc64 code. ok gkoehler@ --- diff --git a/lib/libc/arch/powerpc64/SYS.h b/lib/libc/arch/powerpc64/SYS.h index 7ab8622b000..9964c48093d 100644 --- a/lib/libc/arch/powerpc64/SYS.h +++ b/lib/libc/arch/powerpc64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.4 2020/10/16 23:42:14 deraadt Exp $ */ +/* $OpenBSD: SYS.h,v 1.5 2022/12/07 23:25:59 guenther Exp $ */ /*- * Copyright (c) 1994 * Andrew Cagney. All rights reserved. @@ -54,8 +54,8 @@ /* offset of errno from %r13 */ #define R13_OFFSET_ERRNO (-TCB_OFFSET + TCB_OFFSET_ERRNO) -#define SYSENTRY(x) .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x); \ +#define SYSENTRY(x) .weak x; \ + x = _thread_sys_ ## x; \ ENTRY(_thread_sys_ ## x) #define SYSENTRY_HIDDEN(x) ENTRY(_thread_sys_ ## x) #define __END_HIDDEN(p,x) END(p##x); \ diff --git a/lib/libc/arch/powerpc64/sys/brk.S b/lib/libc/arch/powerpc64/sys/brk.S index 9875e9530f0..a101010b340 100644 --- a/lib/libc/arch/powerpc64/sys/brk.S +++ b/lib/libc/arch/powerpc64/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.4 2020/10/16 23:42:16 deraadt Exp $ */ +/* $OpenBSD: brk.S,v 1.5 2022/12/07 23:25:59 guenther Exp $ */ /* * Copyright (c) 1996 Dale Rahn @@ -28,7 +28,7 @@ #include "SYS.h" .extern __curbrk - .extern _C_LABEL(_end) + .extern _end .weak brk diff --git a/sys/arch/powerpc64/include/asm.h b/sys/arch/powerpc64/include/asm.h index 8b9b6e4ee61..aef1cbbc3d5 100644 --- a/sys/arch/powerpc64/include/asm.h +++ b/sys/arch/powerpc64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.6 2020/10/22 23:35:43 mortimer Exp $ */ +/* $OpenBSD: asm.h,v 1.7 2022/12/07 23:25:59 guenther Exp $ */ /* * Copyright (c) 2020 Dale Rahn @@ -32,7 +32,7 @@ addis %r2, %r12, .TOC.-_GEP_LABEL(x)@ha; \ addi %r2, %r2, .TOC.-_GEP_LABEL(x)@l; \ _LEP_LABEL(x): \ - .localentry _C_LABEL(x), _LEP_LABEL(x)-_GEP_LABEL(x); + .localentry x, _LEP_LABEL(x)-_GEP_LABEL(x); #if defined(PROF) || defined(GPROF) # define _PROF_PROLOGUE(y) \ @@ -50,8 +50,8 @@ _TMP_LABEL(y):; \ # define _PROF_PROLOGUE(y) #endif -#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE(y) -#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE(y) +#define ENTRY(y) _ENTRY(y); _PROF_PROLOGUE(y) +#define ASENTRY(y) _ENTRY(y); _PROF_PROLOGUE(y) #define END(y) .size y, . - y #define STRONG_ALIAS(alias,sym) \