summaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2012-04-17 21:58:50 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2012-04-17 21:58:50 +0000
commite523bade001bcca44af3fe627e0eec868ac9ef81 (patch)
tree7cb3690d3f2805b5fdf111a799c98352af083dcf /bfd/elf32-sh.c
parent61662c2a57c48c6dde39365a94eead7cfe581658 (diff)
downloadbinutils-redhat-e523bade001bcca44af3fe627e0eec868ac9ef81.tar.gz
* elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
relocations when LE conversion happens on the IE tls symbol.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 9bc2dd5a79..87d4e4fcbc 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -3104,6 +3104,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
&& (got_type == GOT_NORMAL || got_type == GOT_FUNCDESC))
htab->srofixup->size += 4;
}
+ /* No dynamic relocations required when IE->LE conversion happens. */
+ else if (got_type == GOT_TLS_IE && !h->def_dynamic && !info->shared)
+ ;
/* R_SH_TLS_IE_32 needs one dynamic relocation if dynamic,
R_SH_TLS_GD needs one if local symbol and two if global. */
else if ((got_type == GOT_TLS_GD && h->dynindx == -1)