Discussion:
buggy visibility (clarification)
Isaac Dunham
2012-10-14 05:01:06 UTC
Permalink
On Sat, 13 Oct 2012 21:44:23 -0700
1. PCC's support for __attribute__(visibility("hidden")) is buggy.
The workaround [2] is suboptimal, although it runs.
The issue here is that hidden visibility does not use GOT-relative (@GOTOFF) addressing.

Also, there's an issue that makes for higher ram use (I quote Rich's comments):
pcc puts static const tables in .data.rel.ro instead of .rodata;
this should be conditional on whether they contain relocations.
data.rel.ro consumes commit charge, so instead of 12k of overhead for shared musl you have >128k of overhead
Thanks,
[1] http://musl-libc.org
[2] http://git.musl-libc.org/cgit/musl/commit/?id=e23d358fd6254d88c85750a23cd1234855c3292c
and
http://git.musl-libc.org/cgit/musl/commit/?id=36be5284c2a79406778ac489928c6deb05857329
Anders Magnusson
2012-10-14 08:38:11 UTC
Permalink
Hi,
3. Minor issue 1: -fPIC usually defines __PIC__, which pcc doesn't do.
This can be circumvented via -D__PIC__
Fixed, thanks!

-- Ragge
Anders Magnusson
2012-10-14 19:33:07 UTC
Permalink
2. With gcc, arrays decay to pointers when used as arguments to inline asm. PCC is incompatible on this point. See [3] for an example.
This was a bad bug that could cause lot of unexplained errors; thanks
for hunting it down.
I have fixed it in -current now.

-- Ragge
Anders Magnusson
2012-10-28 14:00:13 UTC
Permalink
1. PCC's support for __attribute__(visibility("hidden")) is buggy.
The workaround [2] is suboptimal, although it runs.
Should be fixed now, thanks!

-- Ragge

Loading...