This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix .tls_common handling in ld -r


On Thu, Jun 15, 2006 at 07:40:59AM -0700, H. J. Lu wrote:
> On Thu, Jun 15, 2006 at 03:04:02PM +0200, Jakub Jelinek wrote:
> > Hi!
> > 
> > cat > a.c <<EOF
> > __asm (".tls_common foo,4,4");
> > 
> > int
> > main (void)
> > {
> >   extern __thread int foo;
> >   return foo;
> > }
> > EOF
> > gcc -c a.c
> > ld -r -o b.o a.o
> > gcc -o b b.o
> 
> Can you add a testcase?

We don't have yet any checks in the testsuite whether the compiler
supports __thread.  But, perhaps just compiling/ld -r'ing/linking
__asm (".tls_common foo,4,4");
int main (void) { return 0; }
would be enough.  But then again, we need some test to see whether
the target supports TLS at all.  The current TLS tests are all in
ld-<cpu>/ ATM, but this test isn't arch specific.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]