]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Fix Xcode assembly issue
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Jan 2013 06:50:35 +0000 (06:50 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Jan 2013 06:50:35 +0000 (06:50 +0000)
The Xcode assembler is much pickier than GCC. Also the 64-bit
linker is not a fan of relocations so it is better to us IP
relative code, but at least it removes a relocation entry.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
[jordan.l.justen@intel.com: use .byte for retfq rather than lret]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14055 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.S

index 5b8c29a3ae4e42905987e8ee79aa99dd383c6fc3..6a6335d063144e17a37bc4d61b596c257253ff77 100644 (file)
@@ -32,9 +32,9 @@ ASM_PFX(JumpToKernel):
 \r
     // Jump into the compatibility mode CS\r
     pushq   $0x10\r
-    leaq    1f, %rax\r
+    leaq    1f(%rip), %rax\r
     pushq   %rax\r
-    retfq\r
+    .byte   0x48, 0xcb                      ; retfq\r
 \r
 1:  // Now in compatibility mode\r
 .code32\r