diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2022-12-02 12:27:09 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2022-12-02 12:27:09 +0000 |
commit | 3fc7152ad4262f09b957e905cf452cd788564d22 (patch) | |
tree | 8dc334fe3bd8ea6df7201e3b9cbb5d00bdf7c31e /lib/libc | |
parent | f5502b8f1fae4442072910cdadf43f0a69203081 (diff) |
Drop _C_LABEL() uses in riscv64-specific code
_C_LABEL() was useful in the a.out->ELF transition days, way before
RISC-V was a thing.
Also drop uses of _ASM_LABEL() while here, suggested by guenther@
ok guenther@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arch/riscv64/SYS.h | 6 | ||||
-rw-r--r-- | lib/libc/arch/riscv64/sys/brk.S | 10 | ||||
-rw-r--r-- | lib/libc/arch/riscv64/sys/sbrk.S | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/arch/riscv64/SYS.h b/lib/libc/arch/riscv64/SYS.h index 7c1e59a6593..ad2fdf3f59d 100644 --- a/lib/libc/arch/riscv64/SYS.h +++ b/lib/libc/arch/riscv64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.3 2021/05/04 04:26:00 drahn Exp $ */ +/* $OpenBSD: SYS.h,v 1.4 2022/12/02 12:27:08 jca Exp $ */ /*- * Copyright (c) 2020 Brian Bamsch <bbamsch@google.com> * Copyright (c) 1990 The Regents of the University of California. @@ -44,8 +44,8 @@ #define TP_OFFSET_ERRNO TCB_OFFSET_ERRNO #define SYSENTRY(x) \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x); \ + .weak x; \ + x = _thread_sys_ ## x; \ ENTRY(_thread_sys_ ## x) #define SYSENTRY_HIDDEN(x) \ ENTRY(_thread_sys_ ## x) diff --git a/lib/libc/arch/riscv64/sys/brk.S b/lib/libc/arch/riscv64/sys/brk.S index d84e1b5bcd6..f1d75878177 100644 --- a/lib/libc/arch/riscv64/sys/brk.S +++ b/lib/libc/arch/riscv64/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.2 2021/10/25 14:38:10 jca Exp $ */ +/* $OpenBSD: brk.S,v 1.3 2022/12/02 12:27:08 jca Exp $ */ /* * Copyright (c) 2021 Dale Rahn <drahn@openbsd.org> * @@ -18,24 +18,24 @@ #include "SYS.h" .extern __curbrk - .extern _C_LABEL(_end) + .extern _end .data .align 3 __minbrk: - .dword _C_LABEL(_end) + .dword _end ENTRY(brk) RETGUARD_SETUP(brk, t6) - lla t1, _C_LABEL(__minbrk) + lla t1, __minbrk ld t5, 0(t1) bgeu a0, t5, .L_brk_call mv a0, t5 .L_brk_call: mv a2, a0 - lla t1, _C_LABEL(__curbrk) + lla t1, __curbrk li t0, SYS_break ecall diff --git a/lib/libc/arch/riscv64/sys/sbrk.S b/lib/libc/arch/riscv64/sys/sbrk.S index a58effc3232..40b6f0acb5a 100644 --- a/lib/libc/arch/riscv64/sys/sbrk.S +++ b/lib/libc/arch/riscv64/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.2 2021/10/25 14:38:10 jca Exp $ */ +/* $OpenBSD: sbrk.S,v 1.3 2022/12/02 12:27:08 jca Exp $ */ /* * Copyright (c) 2021 Dale Rahn <drahn@openbsd.org> * @@ -17,7 +17,7 @@ #include "SYS.h" - .extern _C_LABEL(_end) + .extern _end .data .align 3 @@ -25,13 +25,13 @@ .hidden __curbrk .type __curbrk,@object __curbrk: - .dword _C_LABEL(_end) + .dword _end END(__curbrk) ENTRY(sbrk) RETGUARD_SETUP(sbrk, t6) - lla t1, _C_LABEL(__curbrk) + lla t1, __curbrk ld a2, 0(t1) add a0, a0, a2 // compute current break mv t3, a0 |