95 lines
2.1 KiB
Diff
95 lines
2.1 KiB
Diff
|
From 1998d63688080e59abda2092ff4b58a1eeb19b90 Mon Sep 17 00:00:00 2001
|
||
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||
|
Date: Sat, 21 Feb 2015 17:20:10 +0100
|
||
|
Subject: [PATCH 310/506] i386-pc/boot: Explicitly mark kernel_address[_high]
|
||
|
as local.
|
||
|
|
||
|
Otherwise apple asm might try to make accesses relocatable.
|
||
|
---
|
||
|
grub-core/boot/i386/pc/boot.S | 22 +++++++++++-----------
|
||
|
1 file changed, 11 insertions(+), 11 deletions(-)
|
||
|
|
||
|
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
|
||
|
index d17a138..2bd0b2d 100644
|
||
|
--- a/grub-core/boot/i386/pc/boot.S
|
||
|
+++ b/grub-core/boot/i386/pc/boot.S
|
||
|
@@ -179,14 +179,14 @@ start:
|
||
|
* End of BIOS parameter block.
|
||
|
*/
|
||
|
|
||
|
-kernel_address:
|
||
|
+LOCAL(kernel_address):
|
||
|
.word GRUB_BOOT_MACHINE_KERNEL_ADDR
|
||
|
|
||
|
#ifndef HYBRID_BOOT
|
||
|
.org GRUB_BOOT_MACHINE_KERNEL_SECTOR
|
||
|
-kernel_sector:
|
||
|
+LOCAL(kernel_sector):
|
||
|
.long 1
|
||
|
-kernel_sector_high:
|
||
|
+LOCAL(kernel_sector_high):
|
||
|
.long 0
|
||
|
#endif
|
||
|
|
||
|
@@ -275,7 +275,7 @@ real_start:
|
||
|
andw $1, %cx
|
||
|
jz LOCAL(chs_mode)
|
||
|
|
||
|
-lba_mode:
|
||
|
+LOCAL(lba_mode):
|
||
|
xorw %ax, %ax
|
||
|
movw %ax, 4(%si)
|
||
|
|
||
|
@@ -290,9 +290,9 @@ lba_mode:
|
||
|
movw $0x0010, (%si)
|
||
|
|
||
|
/* the absolute address */
|
||
|
- movl kernel_sector, %ebx
|
||
|
+ movl LOCAL(kernel_sector), %ebx
|
||
|
movl %ebx, 8(%si)
|
||
|
- movl kernel_sector_high, %ebx
|
||
|
+ movl LOCAL(kernel_sector_high), %ebx
|
||
|
movl %ebx, 12(%si)
|
||
|
|
||
|
/* the segment of buffer address */
|
||
|
@@ -361,13 +361,13 @@ LOCAL(final_init):
|
||
|
|
||
|
setup_sectors:
|
||
|
/* load logical sector start (top half) */
|
||
|
- movl kernel_sector_high, %eax
|
||
|
+ movl LOCAL(kernel_sector_high), %eax
|
||
|
|
||
|
orl %eax, %eax
|
||
|
jnz LOCAL(geometry_error)
|
||
|
|
||
|
/* load logical sector start (bottom half) */
|
||
|
- movl kernel_sector, %eax
|
||
|
+ movl LOCAL(kernel_sector), %eax
|
||
|
|
||
|
/* zero %edx */
|
||
|
xorl %edx, %edx
|
||
|
@@ -452,7 +452,7 @@ LOCAL(copy_buffer):
|
||
|
popa
|
||
|
|
||
|
/* boot kernel */
|
||
|
- jmp *(kernel_address)
|
||
|
+ jmp *(LOCAL(kernel_address))
|
||
|
|
||
|
/* END OF MAIN LOOP */
|
||
|
|
||
|
@@ -512,9 +512,9 @@ LOCAL(message):
|
||
|
|
||
|
#ifdef HYBRID_BOOT
|
||
|
.org 0x1b0
|
||
|
-kernel_sector:
|
||
|
+LOCAL(kernel_sector):
|
||
|
.long 1
|
||
|
-kernel_sector_high:
|
||
|
+LOCAL(kernel_sector_high):
|
||
|
.long 0
|
||
|
#endif
|
||
|
.org GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
|
||
|
--
|
||
|
2.4.3
|
||
|
|