From 5c066a81c298d93c1d4a7a7cdf05450dc6d49400 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 24 Nov 2013 06:20:10 +0100 Subject: [PATCH] Apple assembly doesn't handle symbol arithmetic well. So define an offset symbol in boot.S and use it. --- ChangeLog | 5 +++++ grub-core/boot/i386/pc/boot.S | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 751c04774..821ab2481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-24 Vladimir Serbinenko + + Apple assembly doesn't handle symbol arithmetic well. So define an + offset symbol in boot.S and use it. + 2013-11-24 Vladimir Serbinenko Apple assembly doesn't handle symbol arithmetic well. So instead diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S index 8338f87b0..b4975e2d0 100644 --- a/grub-core/boot/i386/pc/boot.S +++ b/grub-core/boot/i386/pc/boot.S @@ -31,7 +31,7 @@ .macro floppy part_start: -probe_values: +LOCAL(probe_values): .byte 36, 18, 15, 9, 0 LOCAL(floppy_probe): @@ -39,8 +39,12 @@ LOCAL(floppy_probe): /* * Perform floppy probe. */ - - movw MACRO_DOLLAR(probe_values) - 1, %si +#ifdef __APPLE__ + LOCAL(probe_values_minus_one) = LOCAL(probe_values) - 1 + movw MACRO_DOLLAR(LOCAL(probe_values_minus_one)), %si +#else + movw MACRO_DOLLAR(LOCAL(probe_values)) - 1, %si +#endif LOCAL(probe_loop): /* reset floppy controller INT 13h AH=0 */