]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/i386/relocator_common.S [__APPLE__ && __x86_64__]: Use
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 11 Nov 2013 22:02:51 +0000 (23:02 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 11 Nov 2013 22:02:51 +0000 (23:02 +0100)
rip-relative addressing in prologue.

ChangeLog
grub-core/lib/i386/relocator_common.S

index f387a60f35b7744773ffd1697573dea519270604..7949e3352e973fb326d9e5dd3f0e4dbf16a6a21a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-11  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/lib/i386/relocator_common.S [__APPLE__ && __x86_64__]: Use
+       rip-relative addressing in prologue.
+
 2013-11-11  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/misc.h [__APPLE__]: Do not add regparm(0) on x86_64.
index b9d99e10e867fdb7ea083eaac51aa64a23c1f6e1..03f427a03bc159b2a27024a8bcd9a6379cc6f28a 100644 (file)
@@ -42,7 +42,9 @@ LOCAL(base):
        /* %rax contains now our new 'base'.  */
        mov     RAX, RSI
 
-#ifdef __APPLE__
+#if defined (__APPLE__) && defined (__x86_64__)
+       leaq    LOCAL(cont0) (%rip), RAX
+#elif defined (__APPLE__)
        LOCAL(cont0_offset) = LOCAL(cont0) - LOCAL(base)
        add     $LOCAL(cont0_offset), RAX
 #else