> Date: Mon, 9 May 2016 14:47:39 -0700
> From: Philip Guenther <[email protected]>
> 
> On Mon, 9 May 2016, Ingo Schwarze wrote:
> > The libedit build system is unusual in so far as it compiles almost all 
> > C files (but not all of them) as a single compilation unit, editline.c, 
> > that #includes most of the other *.c files.
> ...
> > I'd prefer compiling all modules seperately, like we do it for most 
> > other libraries.  To preserve the benefit of hiding internal interfaces 
> > from the public interface, i'd like to use 
> > __attribute__((visibility("hidden"))) as suggested by Philip Guenther@.
> 
> The one caveat I failed to mention is that visibility doesn't work for the 
> static library.  The result is that while you can use arbitrary names for 
> static symbols, hidden symbols *do* need to follow some sort of naming 
> scheme to avoid accidental overriding when static linking.
> 
> With that caveat: go for it!

well, probably should use

  __dso_hidden

instead of

  __attribute__((visibility("hidden")))

Cheers,

Mark


Reply via email to