[Bug ld/2868] New: IA64: relocation truncated to fit: TPREL22

2006-06-30 Thread gary at intrepid dot com
When linking a program that has a combination of thread local data that 
exceeds 2^21 in size (roughly 0x3e8500), the following link error occurs:

../src/upcr_gccupc.c:81: relocation truncated to fit: TPREL22 MYTHREAD

The variable being referred to is a single word that is relatively far from
the point of reference.

I've tried duplicating this by constructing some simple C files with large 
thread-local declarations, and references to data that should be far away, but 
was unable to make the failure happen.  I can collect the .o's and the ld 
command line that makes it fail, if needed, but there are 50 in total, so if 
there is another way to diagnose the problem or workaround it that would be 
preferred.

-- 
   Summary: IA64: relocation truncated to fit: TPREL22
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: gary at intrepid dot com
CC: bug-binutils at gnu dot org
  GCC host triplet: ia64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=2868

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2869] New: IA64: relocation truncated to fit: TPREL22

2006-06-30 Thread gary at intrepid dot com
When linking a program that has a combination of thread local data that 
exceeds 2^21 in size (roughly 0x3e8500), the following link error occurs:

../src/upcr_gccupc.c:81: relocation truncated to fit: TPREL22 MYTHREAD

The variable being referred to is a single word that is relatively far from
the point of reference.

I've tried duplicating this by constructing some simple C files with large 
thread-local declarations, and references to data that should be far away, but 
was unable to make the failure happen.  I can collect the .o's and the ld 
command line that makes it fail, if needed, but there are 50 in total, so if 
there is another way to diagnose the problem or workaround it that would be 
preferred.

-- 
   Summary: IA64: relocation truncated to fit: TPREL22
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: gary at intrepid dot com
CC: bug-binutils at gnu dot org
  GCC host triplet: ia64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=2869

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2870] New: X86_64: thread-local access via extern requires __thread

2006-06-30 Thread gary at intrepid dot com
A C program that references external data via an 'extern' fails to link, when 
the data is defined as thread-local in a separately compiled file, on an 
x86_64 (Opteron, Fedora Core 5) platform.

For example,

==> file1.c <==
extern int x;
 
int main() {
x = 5;
}
 
==> file2.c <==
int __thread x = 10;

--

% gcc file2.c file1.c
/usr/bin/ld: x: TLS definition in /tmp/ccOzkuFX.o section .tdata mismatches 
non-TLS reference in /tmp/cc1AhtnT.o
/tmp/cc1AhtnT.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

--

The example will compile and link properly with the addition of __thread to 
the extern declaration above.

IMO, the user should not have to specify __thread on the extern declaration 
because the location of the data (section and relocation type) should be 
defined only at the point the data item is declared.

Note that this example (without the additions of __thread) will compile and 
link as is, on an IA64 platform.

(GNU ld version 2.16.91.0.6 20060212)

-- 
   Summary: X86_64: thread-local access via extern requires __thread
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: gary at intrepid dot com
CC: bug-binutils at gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=2870

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2868] IA64: relocation truncated to fit: TPREL22

2006-06-30 Thread gary at intrepid dot com

--- Additional Comments From gary at intrepid dot com  2006-07-01 01:19 
---


*** This bug has been marked as a duplicate of 2869 ***

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


http://sourceware.org/bugzilla/show_bug.cgi?id=2868

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2869] IA64: relocation truncated to fit: TPREL22

2006-06-30 Thread gary at intrepid dot com

--- Additional Comments From gary at intrepid dot com  2006-07-01 01:19 
---
*** Bug 2868 has been marked as a duplicate of this bug. ***

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2869

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2870] X86_64: thread-local access via extern requires __thread

2006-07-03 Thread gary at intrepid dot com

--- Additional Comments From gary at intrepid dot com  2006-07-03 14:32 
---
I agree, and here's the e-mail thread:
http://gcc.gnu.org/ml/gcc/2006-07/msg8.html


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2870

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2869] IA64: relocation truncated to fit: TPREL22

2006-07-06 Thread gary at intrepid dot com

--- Additional Comments From gary at intrepid dot com  2006-07-06 17:47 
---
HJL wrote:
"Compiler should generate R_IA64_TPREL64I when the 2MB limit is exceeded"

Can the compiler determine that TPREL22 won't work, or might a new
compilation switch (ala, -fbig-tls) be needed?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2869

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils