|<< Back to previous view|
[PCC-356] tls data section has wrong flags? Created: 12/Jun/11 Updated: 30/Jun/11
Hi, the following code
__thread int foo = 1;
__thread int bar;
when compiled with "pcc -c" produces warnings
foo.s: Assembler messages:
foo.s:8: Warning: ignoring changed section attributes for .tdata
this is on NetBSD at least, using
GNU assembler version 2.19.1 (i486--netbsdelf) using BFD version (NetBSD Binutils nb1) 2.19.
I fixed it (as per attached tdata.diff) by adding "T" to the section flags similarly to what has
been done with amd64..
|Comment by Iain Hibbert [ 25/Jun/11 08:16 PM ]|
This was fixed with recent commits, except that a new issue was introduced.. compiling a
uninitialised __thread variable with -fPIC causes a NULL pointer dereference when printing
a string, making (at least here) the section directive to be "(null)"
% cat t.c
__thread int t;
% pcc -fPIC -S t.c
% cat t.s
.ident "PCC: pcc 1.1.0.DEVEL 20110625 for netbsd-i386"
|Comment by Anders Magnusson [ 30/Jun/11 09:45 PM ]|
|Requestor reports this bug is fixed.|