OSDN Git Service

Fix the Mac build.
authorDan Albert <danalbert@google.com>
Sun, 10 Aug 2014 06:43:10 +0000 (23:43 -0700)
committerDan Albert <danalbert@google.com>
Sun, 10 Aug 2014 07:14:41 +0000 (00:14 -0700)
Apparently Mac uses a different assembler directive for .hidden.

Change-Id: Ic2adb6bef82e376c3e5f4a29258a85a0dac00cd5

runtime/arch/x86/asm_support_x86.S
runtime/arch/x86/quick_entrypoints_x86.S

index e468c2a..96c2c05 100644 (file)
     #define PLT_SYMBOL(name) _ ## name
 #endif
 
+#if defined(__APPLE__)
+    #define ASM_HIDDEN .private_extern
+#else
+    #define ASM_HIDDEN .hidden
+#endif
+
     /* Cache alignment for function entry */
 MACRO0(ALIGN_FUNCTION_ENTRY)
     .balign 16
index 780c22d..dc4019d 100644 (file)
@@ -161,7 +161,7 @@ END_MACRO
     /*
      * Called by managed code to create and deliver a NullPointerException.
      */
-    .hidden art_quick_throw_null_pointer_exception
+    ASM_HIDDEN art_quick_throw_null_pointer_exception
 NO_ARG_RUNTIME_EXCEPTION art_quick_throw_null_pointer_exception, artThrowNullPointerExceptionFromCode
 
     /*
@@ -204,7 +204,7 @@ ONE_ARG_RUNTIME_EXCEPTION art_quick_throw_no_such_method, artThrowNoSuchMethodFr
      * Called by managed code to create and deliver an ArrayIndexOutOfBoundsException. Arg1 holds
      * index, arg2 holds limit.
      */
-    .hidden art_quick_throw_array_bounds
+    ASM_HIDDEN art_quick_throw_array_bounds
 TWO_ARG_RUNTIME_EXCEPTION art_quick_throw_array_bounds, artThrowArrayBoundsFromCode
 
     /*
@@ -268,7 +268,7 @@ MACRO2(INVOKE_TRAMPOLINE, c_name, cxx_name)
     END_FUNCTION RAW_VAR(c_name, 0)
 END_MACRO
 
-    .hidden art_quick_invoke_interface_trampoline
+    ASM_HIDDEN art_quick_invoke_interface_trampoline
 INVOKE_TRAMPOLINE art_quick_invoke_interface_trampoline, artInvokeInterfaceTrampoline
 INVOKE_TRAMPOLINE art_quick_invoke_interface_trampoline_with_access_check, artInvokeInterfaceTrampolineWithAccessCheck
 
@@ -675,7 +675,7 @@ DEFINE_FUNCTION art_quick_aput_obj_with_null_and_bound_check
     jmp SYMBOL(art_quick_throw_null_pointer_exception)
 END_FUNCTION art_quick_aput_obj_with_null_and_bound_check
 
-    .hidden art_quick_aput_obj_with_bound_check
+    ASM_HIDDEN art_quick_aput_obj_with_bound_check
 DEFINE_FUNCTION art_quick_aput_obj_with_bound_check
     movl ARRAY_LENGTH_OFFSET(%eax), %ebx
     cmpl %ebx, %ecx
@@ -685,7 +685,7 @@ DEFINE_FUNCTION art_quick_aput_obj_with_bound_check
     jmp SYMBOL(art_quick_throw_array_bounds)
 END_FUNCTION art_quick_aput_obj_with_bound_check
 
-    .hidden art_quick_aput_obj
+    ASM_HIDDEN art_quick_aput_obj
 DEFINE_FUNCTION art_quick_aput_obj
     test %edx, %edx              // store of null
     jz .Ldo_aput_null