diff --git a/src/arch/i386/crti.S b/src/arch/i386/crti.S index 03e7149..4e8000b 100644 --- a/src/arch/i386/crti.S +++ b/src/arch/i386/crti.S @@ -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 diff --git a/src/arch/i386/gdt.S b/src/arch/i386/gdt.S index f4fd9d8..6b66a2f 100644 --- a/src/arch/i386/gdt.S +++ b/src/arch/i386/gdt.S @@ -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 diff --git a/src/arch/i386/idt.S b/src/arch/i386/idt.S index 0163216..1dd29f3 100644 --- a/src/arch/i386/idt.S +++ b/src/arch/i386/idt.S @@ -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 */ diff --git a/src/arch/i386/intr.S b/src/arch/i386/intr.S index 8a92738..aaa92a4 100644 --- a/src/arch/i386/intr.S +++ b/src/arch/i386/intr.S @@ -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 diff --git a/src/arch/i386/ioport.S b/src/arch/i386/ioport.S index c0f07f4..e9b8d50 100644 --- a/src/arch/i386/ioport.S +++ b/src/arch/i386/ioport.S @@ -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 */ diff --git a/src/arch/i386/kernel.S b/src/arch/i386/kernel.S index 1db19b1..ce38544 100644 --- a/src/arch/i386/kernel.S +++ b/src/arch/i386/kernel.S @@ -33,7 +33,9 @@ stack_top: .section .text /* start */ .global _start +#ifndef __APPLE__ .type _start, @function +#endif _start: /* disable interrupts */ cli diff --git a/src/arch/i386/loader.S b/src/arch/i386/loader.S index d9c2ffc..317854b 100644 --- a/src/arch/i386/loader.S +++ b/src/arch/i386/loader.S @@ -33,7 +33,9 @@ stack_top: .section .text /* start */ .global _start +#ifndef __APPLE__ .type _start, @function +#endif _start: /* disable interrupts */ cli diff --git a/src/arch/i386/multiboot.S b/src/arch/i386/multiboot.S index 079671a..3df8563 100644 --- a/src/arch/i386/multiboot.S +++ b/src/arch/i386/multiboot.S @@ -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 diff --git a/src/arch/i386/multiboot/header.S b/src/arch/i386/multiboot/header.S index 237b98d..7d995f0 100644 --- a/src/arch/i386/multiboot/header.S +++ b/src/arch/i386/multiboot/header.S @@ -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