summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2022-12-08 01:25:47 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2022-12-08 01:25:47 +0000
commit99f092cb54970a4a2f138ab15c178ba402c6cb20 (patch)
tree33e206da5f6ee96bfb2b8b41acc6d5b3cc135e1c /sys/arch/i386/stand
parent7276046ee3e5ed97bbac25157fd0d675281cac9b (diff)
_C_LABEL() and _ASM_LABEL() are no longer useful in the "everything
is ELF" world. Eliminate use of them in amd64, arm64, armv7, i386, macppc, mips64, and sparc64 code. ok deraadt@ jca@ krw@
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r--sys/arch/i386/stand/boot/srt0.S28
-rw-r--r--sys/arch/i386/stand/cdboot/srt0.S34
-rw-r--r--sys/arch/i386/stand/libsa/debug_i386.S6
-rw-r--r--sys/arch/i386/stand/libsa/debug_md.h4
-rw-r--r--sys/arch/i386/stand/libsa/gidt.S30
-rw-r--r--sys/arch/i386/stand/libsa/pslid.S4
-rw-r--r--sys/arch/i386/stand/libsa/pxe_call.S24
-rw-r--r--sys/arch/i386/stand/pxeboot/srt0.S32
8 files changed, 81 insertions, 81 deletions
diff --git a/sys/arch/i386/stand/boot/srt0.S b/sys/arch/i386/stand/boot/srt0.S
index 868b3264d1c..f747207a295 100644
--- a/sys/arch/i386/stand/boot/srt0.S
+++ b/sys/arch/i386/stand/boot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.16 2012/10/12 15:00:33 jsing Exp $ */
+/* $OpenBSD: srt0.S,v 1.17 2022/12/08 01:25:45 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -31,12 +31,12 @@
#define BOOTSTACK 0xfffc
- .globl _C_LABEL(end)
- .globl _C_LABEL(edata)
- .globl _C_LABEL(boot)
- .globl _C_LABEL(_rtt)
- .globl _C_LABEL(bios_bootdev)
- .globl _ASM_LABEL(pmm_init)
+ .globl end
+ .globl edata
+ .globl boot
+ .globl _rtt
+ .globl bios_bootdev
+ .globl pmm_init
.globl Gdtr
.text
@@ -71,7 +71,7 @@ _start:
mov %ax,%gs
movl $BOOTSTACK,%esp
pushl %edx
- movl %edx, _C_LABEL(bios_bootdev)
+ movl %edx, bios_bootdev
/* Now do it all */
#ifdef DEBUG
@@ -80,13 +80,13 @@ _start:
#endif
/* zero .bss */
xorl %eax, %eax
- movl $_C_LABEL(end), %ecx
- subl $_C_LABEL(edata),%ecx
- movl $_C_LABEL(edata), %edi
+ movl $end, %ecx
+ subl $edata,%ecx
+ movl $edata, %edi
cld
rep; stosb
- call _ASM_LABEL(pmm_init)
- call _C_LABEL(boot)
+ call pmm_init
+ call boot
- jmp _C_LABEL(_rtt)
+ jmp _rtt
diff --git a/sys/arch/i386/stand/cdboot/srt0.S b/sys/arch/i386/stand/cdboot/srt0.S
index 5a721e21c02..1c6efca6dc0 100644
--- a/sys/arch/i386/stand/cdboot/srt0.S
+++ b/sys/arch/i386/stand/cdboot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.3 2012/10/31 14:31:30 jsing Exp $ */
+/* $OpenBSD: srt0.S,v 1.4 2022/12/08 01:25:45 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -31,12 +31,12 @@
#define BOOTSTACK 0xfffc
- .globl _C_LABEL(end)
- .globl _C_LABEL(edata)
- .globl _C_LABEL(boot)
- .globl _C_LABEL(_rtt)
- .globl _C_LABEL(bios_bootdev)
- .globl _ASM_LABEL(pmm_init)
+ .globl end
+ .globl edata
+ .globl boot
+ .globl _rtt
+ .globl bios_bootdev
+ .globl pmm_init
.globl Gdtr
.text
@@ -75,8 +75,8 @@ _start:
movw $(CDBOOTADDR >> 4), %ax /* Reloc from %ds = 0x7c0. */
movw $(LINKADDR >> 4), %bx /* Reloc to %es = 0x4012. */
- movl $_C_LABEL(end), %edx
- subl $_C_LABEL(_start), %edx /* How big are we? */
+ movl $end, %edx
+ subl $_start, %edx /* How big are we? */
/*
* Relocate in blocks that are a maximum of 32KB in size, incrementing
@@ -158,14 +158,14 @@ relocated:
/* Zero .bss */
xorl %eax, %eax
- movl $_C_LABEL(end), %ecx
- subl $_C_LABEL(edata), %ecx
- movl $_C_LABEL(edata), %edi
+ movl $end, %ecx
+ subl $edata, %ecx
+ movl $edata, %edi
cld
rep; stosb
/* Set up an interrupt descriptor table for protected mode. */
- call _ASM_LABEL(pmm_init)
+ call pmm_init
/* Set our program name ("CDBOOT", not "BOOT"). */
movl $cd_progname, %eax
@@ -174,8 +174,8 @@ relocated:
/* Put the boot device number into the globals that need it */
popl %eax /* Get this back from the stack */
pushl %eax /* boot() takes this as a parameter */
- movl %eax, _C_LABEL(bios_bootdev)
- movl %eax, _C_LABEL(bios_cddev)
+ movl %eax, bios_bootdev
+ movl %eax, bios_cddev
/*
* Now call "main()".
@@ -186,10 +186,10 @@ relocated:
movl $0xb8004, %ebx
movl $0x07410741, (%ebx)
#endif
- call _C_LABEL(boot)
+ call boot
/* boot() should not return. If it does, reset computer. */
- jmp _C_LABEL(_rtt)
+ jmp _rtt
ENTRY(debugchar)
pushl %ebx
diff --git a/sys/arch/i386/stand/libsa/debug_i386.S b/sys/arch/i386/stand/libsa/debug_i386.S
index e4005b10cd7..6b861e773a7 100644
--- a/sys/arch/i386/stand/libsa/debug_i386.S
+++ b/sys/arch/i386/stand/libsa/debug_i386.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: debug_i386.S,v 1.12 2004/03/09 19:12:12 tom Exp $ */
+/* $OpenBSD: debug_i386.S,v 1.13 2022/12/08 01:25:45 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -64,7 +64,7 @@ alltraps:
movb $0x17, %ah
movl %eax, (%edi)
#endif
- call _C_LABEL(check_regs)
+ call check_regs
#ifdef DEBUG_DEBUG
movl $0xb8290, %edi
movl $0x47394738, (%edi)
@@ -113,7 +113,7 @@ ENTRY(check_regs)
movl 0x0d*4(%esp), %eax /* trapno */
pushl %ecx
pushl %eax
- call _C_LABEL(dump_regs)
+ call dump_regs
popl %eax
popl %eax
diff --git a/sys/arch/i386/stand/libsa/debug_md.h b/sys/arch/i386/stand/libsa/debug_md.h
index 5ab5e7abac0..9508aa0e891 100644
--- a/sys/arch/i386/stand/libsa/debug_md.h
+++ b/sys/arch/i386/stand/libsa/debug_md.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: debug_md.h,v 1.7 2006/06/06 13:30:42 mickey Exp $ */
+/* $OpenBSD: debug_md.h,v 1.8 2022/12/08 01:25:45 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -48,7 +48,7 @@
"reserved fault base"
#ifdef _LOCORE
- .globl _C_LABEL(reg)
+ .globl reg
#define DUMP_REGS int $2
#else
#define DUMP_REGS __asm("int $2")
diff --git a/sys/arch/i386/stand/libsa/gidt.S b/sys/arch/i386/stand/libsa/gidt.S
index 395a3d7e702..66809f4d05f 100644
--- a/sys/arch/i386/stand/libsa/gidt.S
+++ b/sys/arch/i386/stand/libsa/gidt.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: gidt.S,v 1.37 2019/11/09 17:58:48 deraadt Exp $ */
+/* $OpenBSD: gidt.S,v 1.38 2022/12/08 01:25:45 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -116,16 +116,16 @@
lidt Idtr;
- .globl _C_LABEL(BIOS_regs)
+ .globl BIOS_regs
.text
.code32
- .globl _ASM_LABEL(pmm_init)
- .globl _C_LABEL(_rtt)
+ .globl pmm_init
+ .globl _rtt
ENTRY(_rtt)
#ifdef SOFTRAID
- call _C_LABEL(sr_clear_keys)
+ call sr_clear_keys
#endif
#ifdef GIDT_DEBUG
movl $0xb8000, %ebx
@@ -359,9 +359,9 @@ EMUh:
mov %al, intno
/* Load BIOS registers prior to switching to real mode. */
- movl _C_LABEL(BIOS_regs)+BIOSR_ES, %eax
+ movl BIOS_regs+BIOSR_ES, %eax
mov %eax, 7f
- movl _C_LABEL(BIOS_regs)+BIOSR_DS, %eax
+ movl BIOS_regs+BIOSR_DS, %eax
mov %eax, 6f
prot2real
@@ -409,12 +409,12 @@ intno = . - 1
# movl $Leax, %eax
.byte 0xb8
4: .long 0x90909090
- movl %eax, _C_LABEL(BIOS_regs)+BIOSR_BX
+ movl %eax, BIOS_regs+BIOSR_BX
# movl $Leax, %eax
.byte 0xb8
3: .long 0x90909090
- movl %eax, _C_LABEL(BIOS_regs)+BIOSR_ES
+ movl %eax, BIOS_regs+BIOSR_ES
# movl $Leax, %eax
.byte 0xb8
@@ -427,12 +427,12 @@ intno = . - 1
movb %bh , 0xe*4(%esp)
/* save registers into save area */
- movl %eax, _C_LABEL(BIOS_regs)+BIOSR_AX
- movl %ecx, _C_LABEL(BIOS_regs)+BIOSR_CX
- movl %edx, _C_LABEL(BIOS_regs)+BIOSR_DX
- movl %ebp, _C_LABEL(BIOS_regs)+BIOSR_BP
- movl %esi, _C_LABEL(BIOS_regs)+BIOSR_SI
- movl %edi, _C_LABEL(BIOS_regs)+BIOSR_DI
+ movl %eax, BIOS_regs+BIOSR_AX
+ movl %ecx, BIOS_regs+BIOSR_CX
+ movl %edx, BIOS_regs+BIOSR_DX
+ movl %ebp, BIOS_regs+BIOSR_BP
+ movl %esi, BIOS_regs+BIOSR_SI
+ movl %edi, BIOS_regs+BIOSR_DI
/* clear NT flag in eflags */
pushf
diff --git a/sys/arch/i386/stand/libsa/pslid.S b/sys/arch/i386/stand/libsa/pslid.S
index 67aa7dcb520..40f9b0e9fdd 100644
--- a/sys/arch/i386/stand/libsa/pslid.S
+++ b/sys/arch/i386/stand/libsa/pslid.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: pslid.S,v 1.2 2020/06/14 17:05:45 deraadt Exp $ */
+/* $OpenBSD: pslid.S,v 1.3 2022/12/08 01:25:45 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -32,7 +32,7 @@
#include <machine/asm.h>
#include <machine/psl.h>
- .globl _C_LABEL(pslid)
+ .globl pslid
ENTRY(pslid)
// See if we have CPU identification.
pushfl
diff --git a/sys/arch/i386/stand/libsa/pxe_call.S b/sys/arch/i386/stand/libsa/pxe_call.S
index e560b225f12..406a9cb6e89 100644
--- a/sys/arch/i386/stand/libsa/pxe_call.S
+++ b/sys/arch/i386/stand/libsa/pxe_call.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxe_call.S,v 1.4 2006/01/02 00:26:29 tom Exp $ */
+/* $OpenBSD: pxe_call.S,v 1.5 2022/12/08 01:25:45 guenther Exp $ */
/* $NetBSD: pxe_call.S,v 1.2 2002/03/27 17:24:22 kanaoka Exp $ */
/*
@@ -56,8 +56,8 @@ ENTRY(pxecall_bangpxe)
/* For simplicity, just move all 32 bits. */
movl 8(%ebp), %ebx
- pushw _C_LABEL(pxe_command_buf_seg)
- pushw _C_LABEL(pxe_command_buf_off)
+ pushw pxe_command_buf_seg
+ pushw pxe_command_buf_off
pushw %bx
call prot_to_real /* Enter real mode */
@@ -66,10 +66,10 @@ ENTRY(pxecall_bangpxe)
sti
/* The encoding is: 0x9a offlo offhi seglo seghi */
lcall $0, $0xffff
- .globl _C_LABEL(bangpxe_off)
-_C_LABEL(bangpxe_off) = . - 4
- .globl _C_LABEL(bangpxe_seg)
-_C_LABEL(bangpxe_seg) = . - 2
+ .globl bangpxe_off
+bangpxe_off = . - 4
+ .globl bangpxe_seg
+bangpxe_seg = . - 2
cli
call real_to_prot /* Leave real mode */
@@ -103,7 +103,7 @@ ENTRY(pxecall_pxenv)
* prot_to_real() will set %es to BOOTSEG, so we just need to set
* %(e)di up here. Remember to relocate it!
*/
- movl $_C_LABEL(pxe_command_buf), %edi
+ movl $pxe_command_buf, %edi
subl $LINKADDR, %edi
call prot_to_real /* Enter real mode */
@@ -111,10 +111,10 @@ ENTRY(pxecall_pxenv)
/* The encoding is: 0x9a offlo offhi seglo seghi */
lcall $0, $0xffff
- .globl _C_LABEL(pxenv_off)
-_C_LABEL(pxenv_off) = . - 4
- .globl _C_LABEL(pxenv_seg)
-_C_LABEL(pxenv_seg) = . - 2
+ .globl pxenv_off
+pxenv_off = . - 4
+ .globl pxenv_seg
+pxenv_seg = . - 2
call real_to_prot /* Leave real mode */
.code32
diff --git a/sys/arch/i386/stand/pxeboot/srt0.S b/sys/arch/i386/stand/pxeboot/srt0.S
index 16a0313222c..7d5739d17d9 100644
--- a/sys/arch/i386/stand/pxeboot/srt0.S
+++ b/sys/arch/i386/stand/pxeboot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.3 2012/10/31 14:31:30 jsing Exp $ */
+/* $OpenBSD: srt0.S,v 1.4 2022/12/08 01:25:45 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -31,12 +31,12 @@
#define BOOTSTACK 0xfffc
- .globl _C_LABEL(end)
- .globl _C_LABEL(edata)
- .globl _C_LABEL(boot)
- .globl _C_LABEL(_rtt)
- .globl _C_LABEL(bios_bootdev)
- .globl _ASM_LABEL(pmm_init)
+ .globl end
+ .globl edata
+ .globl boot
+ .globl _rtt
+ .globl bios_bootdev
+ .globl pmm_init
.globl Gdtr
.text
@@ -76,8 +76,8 @@ _start:
movw $(PXEBOOTADDR >> 4), %ax /* Reloc from %ds = 0x7c0. */
movw $(LINKADDR >> 4), %bx /* Reloc to %es = 0x4012. */
- movl $_C_LABEL(end), %edx
- subl $_C_LABEL(_start), %edx /* How big are we? */
+ movl $end, %edx
+ subl $_start, %edx /* How big are we? */
/*
* Relocate in blocks that are a maximum of 32KB in size, incrementing
@@ -149,7 +149,7 @@ relocated:
#endif
xorl %edx, %edx
- movl %edx, _C_LABEL(bios_bootdev)
+ movl %edx, bios_bootdev
pushl %edx /* boot() takes this as a parameter */
#ifdef DEBUG
@@ -159,14 +159,14 @@ relocated:
/* Zero .bss */
xorl %eax, %eax
- movl $_C_LABEL(end), %ecx
- subl $_C_LABEL(edata), %ecx
- movl $_C_LABEL(edata), %edi
+ movl $end, %ecx
+ subl $edata, %ecx
+ movl $edata, %edi
cld
rep; stosb
/* Set up an interrupt descriptor table for protected mode. */
- call _ASM_LABEL(pmm_init)
+ call pmm_init
/* Set our program name ("PXEBOOT", not "BOOT"). */
movl $pxe_progname, %eax
@@ -181,10 +181,10 @@ relocated:
movl $0xb8004, %ebx
movl $0x07410741, (%ebx)
#endif
- call _C_LABEL(boot)
+ call boot
/* boot() should not return. If it does, reset computer. */
- jmp _C_LABEL(_rtt)
+ jmp _rtt
ENTRY(debugchar)
pushl %ebx