Fix build without -Bsymbolic.
For ARM: Gold is unable to create PLT based relocations for conditional
branches.
For x86: Some uses of SYMBOL() should have been PLT_SYMBOL().
Bug: 16853291
Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S
index 86cb16a..c4f8782 100644
--- a/runtime/arch/arm/quick_entrypoints_arm.S
+++ b/runtime/arch/arm/quick_entrypoints_arm.S
@@ -502,20 +502,22 @@
*/
ENTRY art_quick_aput_obj_with_null_and_bound_check
tst r0, r0
- bne art_quick_aput_obj_with_bound_check
+ bne art_quick_aput_obj_with_bound_check_local
b art_quick_throw_null_pointer_exception
END art_quick_aput_obj_with_null_and_bound_check
ENTRY art_quick_aput_obj_with_bound_check
+art_quick_aput_obj_with_bound_check_local:
ldr r3, [r0, #ARRAY_LENGTH_OFFSET]
cmp r3, r1
- bhi art_quick_aput_obj
+ bhi art_quick_aput_obj_local
mov r0, r1
mov r1, r3
b art_quick_throw_array_bounds
END art_quick_aput_obj_with_bound_check
ENTRY art_quick_aput_obj
+art_quick_aput_obj_local:
cbz r2, .Ldo_aput_null
ldr r3, [r0, #CLASS_OFFSET]
ldr ip, [r2, #CLASS_OFFSET]
diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S
index 6d74b83..9a2b969 100644
--- a/runtime/arch/x86/quick_entrypoints_x86.S
+++ b/runtime/arch/x86/quick_entrypoints_x86.S
@@ -668,17 +668,17 @@
*/
DEFINE_FUNCTION art_quick_aput_obj_with_null_and_bound_check
testl %eax, %eax
- jnz SYMBOL(art_quick_aput_obj_with_bound_check)
- jmp SYMBOL(art_quick_throw_null_pointer_exception)
+ jnz PLT_SYMBOL(art_quick_aput_obj_with_bound_check)
+ jmp PLT_SYMBOL(art_quick_throw_null_pointer_exception)
END_FUNCTION art_quick_aput_obj_with_null_and_bound_check
DEFINE_FUNCTION art_quick_aput_obj_with_bound_check
movl ARRAY_LENGTH_OFFSET(%eax), %ebx
cmpl %ebx, %ecx
- jb SYMBOL(art_quick_aput_obj)
+ jb PLT_SYMBOL(art_quick_aput_obj)
mov %ecx, %eax
mov %ebx, %ecx
- jmp SYMBOL(art_quick_throw_array_bounds)
+ jmp PLT_SYMBOL(art_quick_throw_array_bounds)
END_FUNCTION art_quick_aput_obj_with_bound_check
DEFINE_FUNCTION art_quick_aput_obj
@@ -1108,7 +1108,7 @@
movd %xmm0, %ecx // get target method index stored in xmm0
movl OBJECT_ARRAY_DATA_OFFSET(%eax, %ecx, 4), %eax // load the target method
POP ecx
- jmp SYMBOL(art_quick_invoke_interface_trampoline)
+ jmp PLT_SYMBOL(art_quick_invoke_interface_trampoline)
END_FUNCTION art_quick_imt_conflict_trampoline
DEFINE_FUNCTION art_quick_resolution_trampoline