Summary: | Wrong linker relaxation for TLS_LDM_CALL and TLS_GD_CALL on SPARC | ||
---|---|---|---|
Product: | binutils | Reporter: | Eric Botcazou <ebotcazou> |
Component: | ld | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | vincent-srcware |
Priority: | P2 | ||
Version: | 2.22 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Eric Botcazou
2011-10-16 14:41:00 UTC
CVSROOT: /cvs/src Module name: src Changes by: davem@sourceware.org 2011-10-19 00:32:25 Modified files: bfd : ChangeLog elfxx-sparc.c gold : ChangeLog sparc.cc ld/testsuite : ChangeLog ld/testsuite/ld-sparc: tlssunbin32.dd tlssunbin64.dd tlssunpic32.dd tlssunpic64.dd Log message: Fix sparc TLS call relaxation when the delay slot sets up %o0. bfd/ PR binutils/13301 * elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function. (_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr call delay slot instruction forward 4 bytes when performing relaxation. gold/ PR binutils/13301 * sparc.cc (Target_sparc::Relocate::reloc_adjust_addr_): New member to track relocation locations that have moved during TLS reloc optimizations. (Target_sparc::Relocate::Relocate): Initialize to NULL. (Target_sparc::Relocate::relocate): Adjust view down by 4 bytes if it matches reloc_adjust_addr_. (Target_sparc::Relocate::relocate_tls): Always move the __tls_get_addr call delay slot instruction forward 4 bytes when performing relaxation. ld/testsuite/ * ld-sparc/tlssunbin32.dd: Update for TLS call relaxation fix for PR 13301. * ld-sparc/tlssunbin64.dd: Likewise. * ld-sparc/tlssunpic32.dd: Likewise. * ld-sparc/tlssunpic64.dd: Likewise. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5491&r2=1.5492 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfxx-sparc.c.diff?cvsroot=src&r1=1.60&r2=1.61 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.841&r2=1.842 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/sparc.cc.diff?cvsroot=src&r1=1.49&r2=1.50 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1469&r2=1.1470 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunbin32.dd.diff?cvsroot=src&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunbin64.dd.diff?cvsroot=src&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunpic32.dd.diff?cvsroot=src&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunpic64.dd.diff?cvsroot=src&r1=1.2&r2=1.3 CVSROOT: /cvs/src Module name: src Branch: binutils-2_22-branch Changes by: davem@sourceware.org 2011-10-19 00:38:54 Modified files: bfd : ChangeLog elfxx-sparc.c gold : ChangeLog sparc.cc ld/testsuite : ChangeLog ld/testsuite/ld-sparc: tlssunbin32.dd tlssunbin64.dd tlssunpic32.dd tlssunpic64.dd Log message: Fix sparc TLS call relaxation when the delay slot sets up %o0. bfd/ PR binutils/13301 * elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function. (_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr call delay slot instruction forward 4 bytes when performing relaxation. gold/ PR binutils/13301 * sparc.cc (Target_sparc::Relocate::reloc_adjust_addr_): New member to track relocation locations that have moved during TLS reloc optimizations. (Target_sparc::Relocate::Relocate): Initialize to NULL. (Target_sparc::Relocate::relocate): Adjust view down by 4 bytes if it matches reloc_adjust_addr_. (Target_sparc::Relocate::relocate_tls): Always move the __tls_get_addr call delay slot instruction forward 4 bytes when performing relaxation. ld/testsuite/ * ld-sparc/tlssunbin32.dd: Update for TLS call relaxation fix for PR 13301. * ld-sparc/tlssunbin64.dd: Likewise. * ld-sparc/tlssunpic32.dd: Likewise. * ld-sparc/tlssunpic64.dd: Likewise. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.5473.2.6&r2=1.5473.2.7 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfxx-sparc.c.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.60&r2=1.60.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.824.2.1&r2=1.824.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/sparc.cc.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.48&r2=1.48.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.1460.2.3&r2=1.1460.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunbin32.dd.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.3&r2=1.3.20.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunbin64.dd.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.2&r2=1.2.20.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunpic32.dd.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.3&r2=1.3.20.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-sparc/tlssunpic64.dd.diff?cvsroot=src&only_with_tag=binutils-2_22-branch&r1=1.2&r2=1.2.20.1 Fixed in 2.22 and later. |