[PATCH][RFC] API extension for binutils (type of symbols).

Martin Liška mliska@suse.cz
Tue Mar 10 12:20:11 GMT 2020


On 3/10/20 10:39 AM, Martin Liška wrote:
> 
> Are you sure about it?
> $ gcc gcc/testsuite/gcc.target/i386/pr56564-3.c -c -fpic && nm pr56564-3.o
> ...
> 0000000000000000 D s
> 0000000000000010 D t
> 
> ?

A nicer example:

$ cat tls.c
__thread struct S { long a, b; } s = { 0, 0 };
__thread char t[16] = { 7 };

$ gcc tls.c -c && nm -B tls.o
0000000000000000 B s
0000000000000000 D t

Well, TLS seems to me an orthogonal problem. Similarly other special symbols like
.func, .symver, alias attribute, ...

Martin


More information about the Gcc-patches mailing list