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