Summary: | R_386_TLS_LDO_32 relocations aren't handled properly with -pie | ||
---|---|---|---|
Product: | binutils | Reporter: | Matthias Klose <doko> |
Component: | ld | Assignee: | unassigned |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chrisccoulson, fweimer, hjl.tools, ian |
Priority: | P2 | ||
Version: | 2.21 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Matthias Klose
2011-04-08 10:20:41 UTC
The code in elf_i386_relocate_section for R_386_TLS_LDO_32 checks info->shared where it should probably check !info->executable. (In reply to comment #1) > The code in elf_i386_relocate_section for R_386_TLS_LDO_32 checks info->shared > where it should probably check !info->executable. Thanks, Ian. I will check in a fix soon. CVSROOT: /cvs/src Module name: src Changes by: hjl@sourceware.org 2011-04-08 16:14:49 Modified files: bfd : ChangeLog elf32-i386.c ld/testsuite : ChangeLog ld/testsuite/ld-i386: i386.exp Added files: ld/testsuite/ld-i386: tlspie2.d tlspie2.s Log message: 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. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5293&r2=1.5294 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-i386.c.diff?cvsroot=src&r1=1.243&r2=1.244 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1382&r2=1.1383 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-i386/tlspie2.d.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-i386/tlspie2.s.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-i386/i386.exp.diff?cvsroot=src&r1=1.36&r2=1.37 Fixed. Thanks! That does the trick, and I have a working -pie build of firefox now too |