Re: On the cost of libraries



On 1 Sep 2001, Havoc Pennington wrote:

> 
> Maciej Stachowiak <mjs noisehavoc org> writes: 
> > 1) Will symbols with static linkage automatically be private? (I sure
> > hope so).
> 
> AFAIK this is true.
> 

It is true.

> > 2) How do I make symbols with extern linkage private to the library?
> 
> See GTK - use libtool:
> 
>  # libtool option to control which symbols are exported
>  # right now, symbols starting with _ are not exported
>  LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
>  AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
> 
> We make private symbols start with _, but if you didn't want to do
> that you can also have a file where you make a list of private
> symbols. libtool just uses the regexp to generate the file.
> 

The more general solution is linker map files.

>
> Havoc
> 

	Sander

I haven't been vampired. You've been Weatherwaxed.





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