Simplify Apple CC support.
* commands/i386/pc/drivemap_int13h.S: Use LOCAL when possible. Add 0 byte at the end not to have a symbol with empty target. * mmap/i386/pc/mmap_helper.S: Likewise. * genmk.rb: Ignore errors 2030 and 2050. * kern/i386/pc/startup.S: Use LOCAL when possible.
This commit is contained in:
parent
8d2977bb7a
commit
969d1c782d
5 changed files with 58 additions and 86 deletions
|
@ -53,7 +53,7 @@
|
|||
#include <multiboot.h>
|
||||
#include <multiboot2.h>
|
||||
|
||||
#define ABS(x) ((x) - _start + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
|
||||
#define ABS(x) ((x) - LOCAL (base) + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
|
||||
|
||||
.file "startup.S"
|
||||
|
||||
|
@ -66,16 +66,15 @@
|
|||
.globl start, _start
|
||||
start:
|
||||
_start:
|
||||
LOCAL (base):
|
||||
/*
|
||||
* Guarantee that "main" is loaded at 0x0:0x8200.
|
||||
*/
|
||||
#ifdef APPLE_CC
|
||||
codestart_abs = ABS(codestart) - 0x10000
|
||||
ljmp $0, $(codestart_abs)
|
||||
#ifdef __APPLE__
|
||||
ljmp $0, $(ABS(LOCAL (codestart)) - 0x10000)
|
||||
#else
|
||||
ljmp $0, $ABS(codestart)
|
||||
ljmp $0, $ABS(LOCAL (codestart))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compatibility version number
|
||||
*
|
||||
|
@ -183,7 +182,7 @@ multiboot_trampoline:
|
|||
.code16
|
||||
|
||||
/* the real mode code continues... */
|
||||
codestart:
|
||||
LOCAL (codestart):
|
||||
cli /* we're not safe here! */
|
||||
|
||||
/* set up %ds, %ss, and %es */
|
||||
|
@ -1156,7 +1155,7 @@ FUNCTION(grub_console_real_putchar)
|
|||
*/
|
||||
|
||||
/* this table is used in translate_keycode below */
|
||||
translation_table:
|
||||
LOCAL (translation_table):
|
||||
.word GRUB_CONSOLE_KEY_LEFT, GRUB_TERM_LEFT
|
||||
.word GRUB_CONSOLE_KEY_RIGHT, GRUB_TERM_RIGHT
|
||||
.word GRUB_CONSOLE_KEY_UP, GRUB_TERM_UP
|
||||
|
@ -1178,11 +1177,10 @@ translate_keycode:
|
|||
pushw %bx
|
||||
pushw %si
|
||||
|
||||
#ifdef APPLE_CC
|
||||
translation_table_abs = ABS (translation_table) - 0x10000
|
||||
movw $(translation_table_abs), %si
|
||||
#ifdef __APPLE__
|
||||
movw $(ABS(LOCAL (translation_table)) - 0x10000), %si
|
||||
#else
|
||||
movw $ABS(translation_table), %si
|
||||
movw $ABS(LOCAL (translation_table)), %si
|
||||
#endif
|
||||
|
||||
1: lodsw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue