From a0b530dd5e76662156b40c8a84ebb446b6332598 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 9 Aug 2014 23:43:10 -0700 Subject: [PATCH] Fix the Mac build. Apparently Mac uses a different assembler directive for .hidden. Change-Id: Ic2adb6bef82e376c3e5f4a29258a85a0dac00cd5 --- runtime/arch/x86/asm_support_x86.S | 6 ++++++ runtime/arch/x86/quick_entrypoints_x86.S | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/runtime/arch/x86/asm_support_x86.S b/runtime/arch/x86/asm_support_x86.S index e468c2a8d..96c2c05e3 100644 --- a/runtime/arch/x86/asm_support_x86.S +++ b/runtime/arch/x86/asm_support_x86.S @@ -112,6 +112,12 @@ #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 diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S index 780c22d39..dc4019d2a 100644 --- a/runtime/arch/x86/quick_entrypoints_x86.S +++ b/runtime/arch/x86/quick_entrypoints_x86.S @@ -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 -- 2.11.0