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.

The code generation looks correct from Xcode could some one verify with GCC? 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: af...@apple.com

svn diff --diff-cmd diff Library/LoadLinuxLib/X64/JumpToKernel.S
Index: Library/LoadLinuxLib/X64/JumpToKernel.S
===================================================================
--- Library/LoadLinuxLib/X64/JumpToKernel.S     (revision 14050)
+++ Library/LoadLinuxLib/X64/JumpToKernel.S     (working copy)
@@ -31,9 +31,9 @@
 
     // Jump into the compatibility mode CS
     pushq   $0x10
-    leaq    1f, %rax
+    leaq    1f(%rip), %rax
     pushq   %rax
-    retfq
+    lret
 
 1:  // Now in compatibility mode
 .code32

Andrew Fish





------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to