summaryrefslogtreecommitdiffstats
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-arm.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 01f050d567..3a3c8f8059 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2013-06-13 Terry Guo <terry.guo@arm.com>
+
+ PR ld/15302
+ * elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
+ ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
+ supports thumb instructions.
+
2013-06-11 DJ Delorie <dj@redhat.com>
* elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 2ed4741b98..fe01c9a5ac 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -1,6 +1,5 @@
/* 32-bit ELF support for ARM
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ Copyright 1998-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -13341,6 +13340,12 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
h->root.u.def.value = th->root.u.def.value & ~1;
}
+ /* Make sure we are not applying ST_BRANCH_TO_ARM to symbols
+ for thumb-only targets. */
+ if (using_thumb_only (htab)
+ && h->target_internal == ST_BRANCH_TO_ARM)
+ h->target_internal = ST_BRANCH_TO_THUMB;
+
if (eh->dyn_relocs == NULL)
return TRUE;
OpenPOWER on IntegriCloud