[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Acl-devel] [RFC] Add attribute visibility("default") to API functio

From: Mike Frysinger
Subject: Re: [Acl-devel] [RFC] Add attribute visibility("default") to API functions
Date: Fri, 12 Feb 2016 16:21:51 -0500

On 12 Feb 2016 02:10, Andreas Gr├╝nbacher wrote:
> 2016-02-12 0:30 GMT+01:00 Mike Frysinger <address@hidden>:
> > (2) just do in acl.h:
> > #ifndef ACL_API_EXPORT
> > # define ACL_API_EXPORT extern
> > #endif
> this shouldn't be in a public header file, it's worthless outside of
> the library itself.

i don't see a problem with these three lines being in the public header.
we're using the ACL_xxx namespace, and the behavior is the same -- we use
only "extern" on the prototypes.  the header already has to use "extern".

> Since libacl already limits which symbols are visible, I don't really
> see the benefit of this change anyway though.

while true we still have the libtool linker script to limit exported
symbols, using explicit visibility enables better code generation by
the compiler.  if it knows a symbol is not exported, it doesn't need
to go through the PLT because symbol interposition isn't available.
it's like declaring symbols static, but across multiple compilation
units.  when used w/LTO, the compiler can even consider inlining the

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]