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

Re: more non-PIC static libs in shared libs

On Fri, Jan 10, 2003 at 12:12:26PM -0800, David Schleef wrote:
> Most of the problem relocations in libHermes could be fixed if
> there was a way to resolve all the internal references in the
> library at compile-linking time.  The only way I've figured out
> how to do this is to put everything in one .c file and declare
> all internal functions as static.  I am curious if there is an
> easier way to do this that I have overlooked.

Yes.  If you hide the symbols, using __attribute__((hidden)) and/or
version maps, the linker will resolve the relocations.  This is perfect
if you don't want the symbols visible externally at all.  There's some
more complex things you can do if you want them to be externally
visible and still resolved internally.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

Reply to: