* Alfred Perlstein <[EMAIL PROTECTED]> [031221 02:47] wrote:
> How do I get __thread to work for me?
> 
> http://gcc.gnu.org/onlinedocs/gcc/Thread-Local.html
> 
> it seems the assembler chokes on it?

Taking this code:

#include <stdio.h>
__thread int x;
int
main(int argc, char **argv)
{
        printf("duh:\n");
        return (0);
}

Running it through "gcc -S" results in an asm file that has this
at the end:

.globl %lx
        .section        .tbss,"awT",@nobits
        .p2align 2
        .type   %lx, @object
        .size   %lx, 4
%lx:
        .zero   4
        .ident  "GCC: (GNU) 3.3.3 [FreeBSD] 20031106"


as(1) will accept this file if I replace all occurrances of
'%lx' with 'lx', it then appears to create special section
called tbss, (this is used for automatic thread specific
data).

Where is the bug, the compiler or the assembler, anyone have
a fix?

-- 
- Alfred Perlstein
- Research Engineering Development Inc.
- email: [EMAIL PROTECTED] cell: 408-480-4684
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to