]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix issue with CodeSourcery gcc requiring assembly functions to have a .type define...
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 15 Dec 2010 00:58:34 +0000 (00:58 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 15 Dec 2010 00:58:34 +0000 (00:58 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11167 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Arm/ProcessorBind.h
MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S
MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S
MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S
MdePkg/Library/BaseLib/Arm/DisableInterrupts.S
MdePkg/Library/BaseLib/Arm/EnableInterrupts.S
MdePkg/Library/BaseLib/Arm/GetInterruptsState.S
MdePkg/Library/BaseLib/Arm/Math64.S
MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S

index 810bf03be0db0318ae4735f999318f8b7dc2cd60..a68b30b811dcefcf69087faa6b21d103065a713c 100644 (file)
@@ -110,6 +110,20 @@ typedef INT32   INTN;
   /// Define this macro to unify the usage.\r
   ///\r
   #define ASM_GLOBAL .globl\r
+\r
+  #if !defined(__APPLE__)\r
+    ///\r
+    /// ARM EABI defines that the linker should not manipulate call relocations\r
+    /// (do bl/blx conversion) unless the target symbol has function type.\r
+    /// CodeSourcery 2010.09 started requiring the .type to function properly\r
+    ///\r
+    #define INTERWORK_FUNC(func__)   .type ASM_PFX(func__), %function\r
+  #else\r
+    //\r
+    // .type not supported by Apple Xcode tools \r
+    //\r
+    #define INTERWORK_FUNC(func__)\r
+  #endif\r
 #endif\r
 \r
 /**\r
index 5ea90114beae47757241c6dd94e4c743abb62bb5..46ef3e09f03c95a597b4bee7a30beb04495bf7ed 100644 (file)
@@ -17,6 +17,7 @@
 .text\r
 .p2align 2\r
 .globl ASM_PFX(CpuFlushTlb)\r
+INTERWORK_FUNC(CpuFlushTlb)
 \r
 #/**\r
 #  Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
index cf20b0876252d7365ee969dc0536ae89138abe7a..ec2061a4b32aec9d742be23ef9739ec5d2d22740 100644 (file)
@@ -17,6 +17,7 @@
 .text\r
 .p2align 2\r
 .globl ASM_PFX(CpuSleep)\r
+INTERWORK_FUNC(CpuSleep)
 \r
 #/**\r
 #  Places the CPU in a sleep state until an interrupt is received.\r
index 43b747fb62f9f4625c3cbb267441b51942c8467f..8ba3a439bda338c6ca9e43868833e4785dcf4ce4 100644 (file)
@@ -17,6 +17,7 @@
 .text\r
 .p2align 2\r
 .globl ASM_PFX(CpuBreakpoint)\r
+INTERWORK_FUNC(CpuBreakpoint)
 \r
 #/**\r
 #  Generates a breakpoint on the CPU.\r
index 338bd780aaae5815ec5b24d9c043d67c90be1531..83db27a3fb79d02043de1cec6d660eb457fd2c06 100644 (file)
@@ -17,6 +17,7 @@
 .text\r
 .p2align 2\r
 .globl ASM_PFX(DisableInterrupts)\r
+INTERWORK_FUNC(DisableInterrupts)
 \r
 #/**\r
 #  Disables CPU interrupts.\r
index 4fde6ec88e2788dd9f9859cc96d1e855284a377b..f5649270219773930d597e8f0cdb4c867b9d3713 100644 (file)
@@ -17,6 +17,7 @@
 .text\r
 .p2align 2\r
 .globl ASM_PFX(EnableInterrupts)\r
+INTERWORK_FUNC(EnableInterrupts)
 \r
 \r
 #/**\r
index a7cd3c5cf22313d86b6ffc358ab80dab557a454a..95b3c5f07ec56b7f405bcfbe800b749e50b16b6a 100644 (file)
@@ -16,7 +16,8 @@
 \r
 .text\r
 .p2align 2\r
-.globl _GetInterruptState\r
+.globl ASM_PFX(GetInterruptState)\r
+INTERWORK_FUNC(GetInterruptState)
 \r
 #/**\r
 #  Retrieves the current CPU interrupt state.\r
@@ -35,7 +36,7 @@
 #  VOID\r
 # );\r
 #\r
-_GetInterruptState:\r
+ASM_PFX(GetInterruptState):\r
     mrs    R0, CPSR\r
     tst    R0, #0x80  @Check if IRQ is enabled.\r
     moveq  R0, #1\r
index d76fd5b42b28da47a64e2af9e2ec346c5dc5803c..76a3c5516073d69bc322276106c7203f09266298 100755 (executable)
@@ -20,6 +20,8 @@
        .text
        .align 2
        .globl ASM_PFX(InternalMathLShiftU64)
+       INTERWORK_FUNC(InternalMathLShiftU64)
+
 ASM_PFX(InternalMathLShiftU64):
        stmfd   sp!, {r4, r5, r6}
        mov     r6, r1
@@ -37,6 +39,8 @@ ASM_PFX(InternalMathLShiftU64):
 
        .align 2
        .globl ASM_PFX(InternalMathRShiftU64)
+       INTERWORK_FUNC(InternalMathRShiftU64)
+
 ASM_PFX(InternalMathRShiftU64):
        stmfd   sp!, {r4, r5, r6}
        mov     r5, r0
@@ -54,6 +58,8 @@ ASM_PFX(InternalMathRShiftU64):
 
        .align 2
        .globl ASM_PFX(InternalMathARShiftU64)
+       INTERWORK_FUNC(InternalMathARShiftU64)
+
 ASM_PFX(InternalMathARShiftU64):
        stmfd   sp!, {r4, r5, r6}
        mov     r5, r0
@@ -71,6 +77,8 @@ ASM_PFX(InternalMathARShiftU64):
 
        .align 2
        .globl ASM_PFX(InternalMathLRotU64)
+       INTERWORK_FUNC(InternalMathLRotU64)
+
 ASM_PFX(InternalMathLRotU64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
        add     r7, sp, #12
@@ -96,6 +104,8 @@ ASM_PFX(InternalMathLRotU64):
 
        .align 2
        .globl ASM_PFX(InternalMathRRotU64)
+       INTERWORK_FUNC(InternalMathRRotU64)
+
 ASM_PFX(InternalMathRRotU64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
        add     r7, sp, #12
@@ -120,6 +130,8 @@ ASM_PFX(InternalMathRRotU64):
 
        .align 2
        .globl ASM_PFX(InternalMathMultU64x32)
+       INTERWORK_FUNC(InternalMathMultU64x32)
+
 ASM_PFX(InternalMathMultU64x32):
        stmfd   sp!, {r7, lr}
        add     r7, sp, #0
@@ -133,6 +145,8 @@ ASM_PFX(InternalMathMultU64x32):
 
        .align 2
        .globl ASM_PFX(InternalMathMultU64x64)
+       INTERWORK_FUNC(InternalMathMultU64x64)
+
 ASM_PFX(InternalMathMultU64x64):
        stmfd   sp!, {r7, lr}
        add     r7, sp, #0
@@ -145,6 +159,8 @@ ASM_PFX(InternalMathMultU64x64):
 
        .align 2
        .globl ASM_PFX(InternalMathDivU64x32)
+       INTERWORK_FUNC(InternalMathDivU64x32)
+
 ASM_PFX(InternalMathDivU64x32):
        stmfd   sp!, {r7, lr}
        add     r7, sp, #0
@@ -155,6 +171,8 @@ ASM_PFX(InternalMathDivU64x32):
        
        .align 2
        .globl ASM_PFX(InternalMathModU64x32)
+       INTERWORK_FUNC(InternalMathModU64x32)
+
 ASM_PFX(InternalMathModU64x32):
        stmfd   sp!, {r7, lr}
        add     r7, sp, #0
@@ -165,6 +183,8 @@ ASM_PFX(InternalMathModU64x32):
        
        .align 2
        .globl ASM_PFX(InternalMathDivRemU64x32)
+       INTERWORK_FUNC(InternalMathDivRemU64x32)
+
 ASM_PFX(InternalMathDivRemU64x32):
        stmfd   sp!, {r4, r5, r6, r7, lr}
        add     r7, sp, #12
@@ -192,6 +212,8 @@ L22:
        
        .align 2
        .globl ASM_PFX(InternalMathDivRemU64x64)
+       INTERWORK_FUNC(InternalMathDivRemU64x64)
+
 ASM_PFX(InternalMathDivRemU64x64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
        add     r7, sp, #12
@@ -217,6 +239,8 @@ L26:
        
        .align 2
        .globl ASM_PFX(InternalMathDivRemS64x64)
+       INTERWORK_FUNC(InternalMathDivRemS64x64)
+
 ASM_PFX(InternalMathDivRemS64x64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
        add     r7, sp, #12
@@ -242,6 +266,8 @@ L30:
        
        .align 2
        .globl ASM_PFX(InternalMathSwapBytes64)
+       INTERWORK_FUNC(InternalMathSwapBytes64)
+
 ASM_PFX(InternalMathSwapBytes64):
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 1, uses_anonymous_args = 0
index a894cd7ee997eb3d59596cb20b8a1a7a26c619e1..74bf07ed7c1b8b722501f0dbd05e011fdba2b288 100644 (file)
 .p2align 2\r
 \r
 .globl ASM_PFX(SetJump)\r
+INTERWORK_FUNC(SetJump)
+\r
 .globl ASM_PFX(InternalLongJump)\r
+INTERWORK_FUNC(InternalLongJump)
 \r
 #/**\r
 #  Saves the current CPU context that can be restored with a call to LongJump() and returns 0.#\r