[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/6443] New: -pie issues with TLS relocations

From: jakub at redhat dot com
Subject: [Bug ld/6443] New: -pie issues with TLS relocations
Date: 22 Apr 2008 09:17:52 -0000

__thread int a;
__thread int b __attribute((tls_model ("local-exec")));
__thread int c __attribute((tls_model ("initial-exec")));
__thread int d __attribute((tls_model ("local-dynamic")));
__thread int e __attribute((tls_model ("global-dynamic")));

main (void)
  return a + b + c + d + e;

compiled/linked with -O2 -pie -fpie on various arches either doesn't link at 
or makes completely unnecessarily a DT_TEXTREL PIE.  Tried x86_64, i386, ppc,
ppc64.  For the TLS transitions and relocations, PIEs should be handled like
other executables, so many info->shared checks need to be replaced with
!info->executable.  For the TLS relocations, even when the executable is
position independent, the offsets within the PIE's TLS block are known at link
time and so relocations like R_X86_64_TPOFF32 can be relocated fully at link

           Summary: -pie issues with TLS relocations
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: jakub at redhat dot com
                CC: bug-binutils at gnu dot org


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]