summaryrefslogtreecommitdiffstats
path: root/binutils-2.21/bfd
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-07-23 10:58:01 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2012-07-23 16:35:57 -0700
commitf4f723a0638d45ff26d233cbfe70089084d27a91 (patch)
tree2471b2ec401814bb64c88f14015aecb2b13fc345 /binutils-2.21/bfd
parentfa1f1a225fd4598b2fb6edf4bf63591c9e72d13a (diff)
downloadtoolchain_binutils-f4f723a0638d45ff26d233cbfe70089084d27a91.tar.gz
toolchain_binutils-f4f723a0638d45ff26d233cbfe70089084d27a91.tar.bz2
toolchain_binutils-f4f723a0638d45ff26d233cbfe70089084d27a91.zip
Fix error: unresolvable R_ARM_THM_CALL relocation
Backport of fix in cvs binutils 1.277 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-arm.c.diff?cvsroot=src&r1=text&tr1=1.277&r2=text&tr2=1.276&f=u Related issue & thread http://code.google.com/p/android/issues/detail?id=35342 https://groups.google.com/forum/?fromgroups#!topic/android-ndk/HaLycHImqL8 Change-Id: Iee449ff9ed8effe6591aee5258eed502c7a484de
Diffstat (limited to 'binutils-2.21/bfd')
-rw-r--r--binutils-2.21/bfd/elf32-arm.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/binutils-2.21/bfd/elf32-arm.c b/binutils-2.21/bfd/elf32-arm.c
index 4e695c66..ee920b7f 100644
--- a/binutils-2.21/bfd/elf32-arm.c
+++ b/binutils-2.21/bfd/elf32-arm.c
@@ -7177,10 +7177,15 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
sym_sec, h,
rel, globals,
stub_type);
- if (stub_entry != NULL)
- value = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
+ {
+ if (stub_entry != NULL)
+ value = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
+
+ if (h && h->plt.offset != (bfd_vma) -1)
+ *unresolved_reloc_p = FALSE;
+ }
}
else
{
@@ -7607,9 +7612,14 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
rel, globals,
stub_type);
if (stub_entry != NULL)
- value = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
+ {
+ value = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
+
+ if (h && h->plt.offset != (bfd_vma) -1)
+ *unresolved_reloc_p = FALSE;
+ }
/* If this call becomes a call to Arm, force BLX. */
if (globals->use_blx && (r_type == R_ARM_THM_CALL))