Avoid using .type on macOS
This should be replaced by generic macros for assembly files.
This commit is contained in:
parent
2a4c1c3e6d
commit
c82d2f45cb
|
@ -9,7 +9,9 @@
|
|||
/* init */
|
||||
.section .init
|
||||
.global _init
|
||||
#ifndef __APPLE__
|
||||
.type _init, @function
|
||||
#endif
|
||||
_init:
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
|
@ -18,7 +20,9 @@ _init:
|
|||
/* fini */
|
||||
.section .fini
|
||||
.global _fini
|
||||
#ifndef __APPLE__
|
||||
.type _fini, @function
|
||||
#endif
|
||||
_fini:
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
.section .text
|
||||
/* arch_setgdt */
|
||||
.global __arch_setgdt
|
||||
#ifndef __APPLE__
|
||||
.type __arch_setgdt, @function
|
||||
#endif
|
||||
__arch_setgdt:
|
||||
#if 1
|
||||
lea gdt_descriptor, %ecx
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
.section .text
|
||||
/* arch_setidt */
|
||||
.global __arch_setidt
|
||||
#ifndef __APPLE__
|
||||
.type __arch_setidt, @function
|
||||
#endif
|
||||
__arch_setidt:
|
||||
lea idt, %ecx
|
||||
/* set the offset of the IDT */
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
/* text */
|
||||
.section .text
|
||||
.global intr_disable
|
||||
#ifndef __APPLE__
|
||||
.type intr_disable, @function
|
||||
#endif
|
||||
intr_disable:
|
||||
cli
|
||||
ret
|
||||
|
@ -16,7 +18,9 @@ intr_disable:
|
|||
|
||||
/* intr_enable */
|
||||
.global intr_enable
|
||||
#ifndef __APPLE__
|
||||
.type intr_enable, @function
|
||||
#endif
|
||||
intr_enable:
|
||||
sti
|
||||
ret
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
.section .text
|
||||
/* inb */
|
||||
.global inb
|
||||
#ifndef __APPLE__
|
||||
.type inb, @function
|
||||
#endif
|
||||
inb:
|
||||
mov 0x4(%esp), %dx /* address */
|
||||
movl 0x8(%esp), %ecx /* return address */
|
||||
|
@ -22,7 +24,9 @@ inb:
|
|||
|
||||
/* iowait */
|
||||
.global iowait
|
||||
#ifndef __APPLE__
|
||||
.type iowait, @function
|
||||
#endif
|
||||
iowait:
|
||||
xor %eax, %eax
|
||||
outb %al, $0x80
|
||||
|
@ -33,7 +37,9 @@ iowait:
|
|||
|
||||
/* outb */
|
||||
.global outb
|
||||
#ifndef __APPLE__
|
||||
.type outb, @function
|
||||
#endif
|
||||
outb:
|
||||
mov 0x4(%esp), %dx /* address */
|
||||
mov 0x8(%esp), %al /* value */
|
||||
|
|
|
@ -33,7 +33,9 @@ stack_top:
|
|||
.section .text
|
||||
/* start */
|
||||
.global _start
|
||||
#ifndef __APPLE__
|
||||
.type _start, @function
|
||||
#endif
|
||||
_start:
|
||||
/* disable interrupts */
|
||||
cli
|
||||
|
|
|
@ -33,7 +33,9 @@ stack_top:
|
|||
.section .text
|
||||
/* start */
|
||||
.global _start
|
||||
#ifndef __APPLE__
|
||||
.type _start, @function
|
||||
#endif
|
||||
_start:
|
||||
/* disable interrupts */
|
||||
cli
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
.section .text
|
||||
/* multiboot_boot_kernel32 */
|
||||
.global multiboot_boot_kernel32
|
||||
#ifndef __APPLE__
|
||||
.type multiboot_boot_kernel32, @function
|
||||
#endif
|
||||
multiboot_boot_kernel32:
|
||||
/* jump into the 32-bit kernel */
|
||||
mov 0x4(%esp), %ebx
|
||||
|
@ -41,7 +43,9 @@ multiboot_boot_kernel32:
|
|||
|
||||
|
||||
.global multiboot_boot_kernel64
|
||||
#ifndef __APPLE__
|
||||
.type multiboot_boot_kernel64, @function
|
||||
#endif
|
||||
multiboot_boot_kernel64:
|
||||
/* check for 64-bit capability */
|
||||
pushf
|
||||
|
|
|
@ -50,7 +50,9 @@ multiboot_header:
|
|||
.section .text
|
||||
/* multiboot_start */
|
||||
.global _multiboot_start
|
||||
# ifndef __APPLE__
|
||||
.type _multiboot_start, @function
|
||||
# endif
|
||||
_multiboot_start:
|
||||
jmp _start
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user