diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-04-08 16:14:49 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-04-08 16:14:49 +0000 |
commit | 959b0961c9c714aa735ebb59e925fdf6f5117d99 (patch) | |
tree | a4ee34555eb80fd9b8a2b650389f7a219bd8a001 /bfd/elf32-i386.c | |
parent | 0e9dfb462638da8467eaa6f3981234f828463387 (diff) | |
download | gdb-959b0961c9c714aa735ebb59e925fdf6f5117d99.zip gdb-959b0961c9c714aa735ebb59e925fdf6f5117d99.tar.gz gdb-959b0961c9c714aa735ebb59e925fdf6f5117d99.tar.bz2 |
Properly handle R_386_TLS_LDO_32 for PIE.
bfd/
2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12654
* elf32-i386.c (elf_i386_relocate_section): Check !executable
instead of shared for R_386_TLS_LDO_32.
ld/testsuite/
2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12654
* ld-i386/i386.exp: Run tlspie2.
* ld-i386/tlspie2.d: New.
* ld-i386/tlspie2.s: Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 693c8e8..1b76cb4 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -4025,7 +4025,7 @@ elf_i386_relocate_section (bfd *output_bfd, break; case R_386_TLS_LDO_32: - if (info->shared || (input_section->flags & SEC_CODE) == 0) + if (!info->executable || (input_section->flags & SEC_CODE) == 0) relocation -= elf_i386_dtpoff_base (info); else /* When converting LDO to LE, we must negate. */ |