]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Make SEC ModuleEntryPoint build with Xcode. Just need another level of indirection
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Jul 2010 13:24:16 +0000 (13:24 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Jul 2010 13:24:16 +0000 (13:24 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10622 6f19259b-4bc3-4df7-8a09-765794883524

ArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.S

index f87aa58037aa0fc0b9df96fb6a28056649b72735..385dd334bb8d1e8c626aabb3720fec583697c481 100755 (executable)
 .globl ASM_PFX(_ModuleEntryPoint)\r
 .globl ASM_PFX(StartupAddr)\r
 \r
+\r
+ASM_PFX(CEntryPointData):\r
+  .word ASM_PFX(StartupAddr)\r
+\r
 ASM_PFX(_ModuleEntryPoint):\r
  \r
   // Turn off remapping NOR to 0. We can now use DRAM in low memory\r
@@ -63,13 +67,11 @@ ASM_PFX(_ModuleEntryPoint):
  \r
   // move sec startup address into a data register\r
   // ensure we're jumping to FV version of the code (not boot remapped alias)\r
-#ifndef __APPLE__\r
-// This does not generate a valid relocation for Xcode. Fix me...\r
-  ldr   r4, ASM_PFX(StartupAddr)\r
+  ldr   r5, ASM_PFX(CEntryPointData) // Extra level of indirection fixes Xcode relocation issue\r
+  ldr   r4, [r5]\r
 \r
   // jump to SEC C code\r
   blx   r4\r
-#endif\r
   \r
 \r
 ASM_PFX(ShouldNeverGetHere):\r