aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2011-06-22 22:02:16 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2011-06-22 22:02:16 +0000
commitb68593b98ef56827eedce7c84e9845ac6ba06999 (patch)
tree86174d920cde04402297323733157637477286ef /bfd/elf32-sh.c
parentb24539b3f73987e158d7c34fee758f40297d69d9 (diff)
downloadgdb-b68593b98ef56827eedce7c84e9845ac6ba06999.zip
gdb-b68593b98ef56827eedce7c84e9845ac6ba06999.tar.gz
gdb-b68593b98ef56827eedce7c84e9845ac6ba06999.tar.bz2
* elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
(sh_elf_check_relocs): Likewise.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index b85b7c2..ca2c4af 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -5516,7 +5516,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
check_segment[0] = check_segment[1] = -1;
- if (! info->shared)
+ if (! info->shared || info->pie)
{
relocation = tpoff (info, relocation);
addend = rel->r_addend;
@@ -6614,7 +6614,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
break;
case R_SH_TLS_LE_32:
- if (info->shared)
+ if (info->shared && !info->pie)
{
(*_bfd_error_handler)
(_("%B: TLS local exec code cannot be linked into shared objects"),