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
diff --git a/runtime/Android.mk b/runtime/Android.mk
index 1e037f5..4371f13 100644
--- a/runtime/Android.mk
+++ b/runtime/Android.mk
@@ -379,9 +379,7 @@
   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 86cb16a..6c63a1a 100644
--- a/runtime/arch/arm/quick_entrypoints_arm.S
+++ b/runtime/arch/arm/quick_entrypoints_arm.S
@@ -506,6 +506,7 @@
     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 @@
     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 6d74b83..780c22d 100644
--- a/runtime/arch/x86/quick_entrypoints_x86.S
+++ b/runtime/arch/x86/quick_entrypoints_x86.S
@@ -161,6 +161,7 @@
     /*
      * 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 @@
      * 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 @@
     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 @@
     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 @@
     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