[FFmpeg-devel] [PATCH] Add support for __attribute__((visibility()))

Michael Niedermayer michaelni
Thu Feb 19 18:02:49 CET 2009


On Wed, Feb 18, 2009 at 09:45:57AM +0100, Gwenole Beauchesne wrote:
> Hi,
>
> This patch adds support for __attribute__((visibility)). This is not 
> something you can check from a compiler POV only as it requires proper 
> tools support.
>
> Only attribute_hidden will be generally useful. attribute_internal has the 
> other benefit to tell the compiler you guarantee the symbol will never be 
> used indirectly (e.g. function pointer).

the default should be internal or hidden (this is tricky due to many bugs in
gcc like exceptions for extern and no exception for code from /usr/include/*)

but once someone forks gcc and fixes these ...
the only thing needed is setting -fvisibility=hidden/internal
and adding a 
#pragma GCC visibility push(default)
at the top of the public headers

well, or maybe we end with a repetition of the PT_GNU_STACK joke where
99% of code needs to be marked as "no really this is normal code" instead
of the 1% that is a special case ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090219/e30ab093/attachment.pgp>



More information about the ffmpeg-devel mailing list