From 6a763f149f0c6f705cab8fb1984aa6f9198b2841 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 9 Aug 2014 18:12:10 -0700 Subject: [PATCH] Proper fix after -Bsymbolic change. Marking the offending symbols as hidden allows the linker to resolve them at build time. Bug: 16853291 Change-Id: I1480c1520c23f81e42831a66737bba7bdf3433c2 --- runtime/Android.mk | 4 +--- runtime/arch/arm/quick_entrypoints_arm.S | 2 ++ runtime/arch/x86/quick_entrypoints_x86.S | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/runtime/Android.mk b/runtime/Android.mk index ac0b414e9..302e835e7 100644 --- a/runtime/Android.mk +++ b/runtime/Android.mk @@ -375,9 +375,7 @@ $$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PAT LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN) LOCAL_CFLAGS := $$(LIBART_CFLAGS) - # TODO(danalbert): Work around the test failures caused by removing -Bsymbolic - # by turning it back on for libart until I get a chance to look at them. - LOCAL_LDFLAGS := $$(LIBART_LDFLAGS) -Wl,-Bsymbolic + LOCAL_LDFLAGS := $$(LIBART_LDFLAGS) ifeq ($$(art_target_or_host),target) LOCAL_LDFLAGS += $$(LIBART_TARGET_LDFLAGS) else diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S index 86cb16aab..6c63a1afc 100644 --- a/runtime/arch/arm/quick_entrypoints_arm.S +++ b/runtime/arch/arm/quick_entrypoints_arm.S @@ -506,6 +506,7 @@ ENTRY art_quick_aput_obj_with_null_and_bound_check b art_quick_throw_null_pointer_exception END art_quick_aput_obj_with_null_and_bound_check + .hidden art_quick_aput_obj_with_bound_check ENTRY art_quick_aput_obj_with_bound_check ldr r3, [r0, #ARRAY_LENGTH_OFFSET] cmp r3, r1 @@ -515,6 +516,7 @@ ENTRY art_quick_aput_obj_with_bound_check b art_quick_throw_array_bounds END art_quick_aput_obj_with_bound_check + .hidden art_quick_aput_obj ENTRY art_quick_aput_obj cbz r2, .Ldo_aput_null ldr r3, [r0, #CLASS_OFFSET] diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S index 6d74b837d..780c22d39 100644 --- a/runtime/arch/x86/quick_entrypoints_x86.S +++ b/runtime/arch/x86/quick_entrypoints_x86.S @@ -161,6 +161,7 @@ END_MACRO /* * Called by managed code to create and deliver a NullPointerException. */ + .hidden art_quick_throw_null_pointer_exception NO_ARG_RUNTIME_EXCEPTION art_quick_throw_null_pointer_exception, artThrowNullPointerExceptionFromCode /* @@ -203,6 +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 TWO_ARG_RUNTIME_EXCEPTION art_quick_throw_array_bounds, artThrowArrayBoundsFromCode /* @@ -266,6 +268,7 @@ MACRO2(INVOKE_TRAMPOLINE, c_name, cxx_name) END_FUNCTION RAW_VAR(c_name, 0) END_MACRO + .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 @@ -672,6 +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 DEFINE_FUNCTION art_quick_aput_obj_with_bound_check movl ARRAY_LENGTH_OFFSET(%eax), %ebx cmpl %ebx, %ecx @@ -681,6 +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 DEFINE_FUNCTION art_quick_aput_obj test %edx, %edx // store of null jz .Ldo_aput_null -- 2.11.0