Re: more non-PIC static libs in shared libs
On Sat, Jan 11, 2003 at 05:27:44PM +0100, Daniel Kobras wrote:
> On Fri, Jan 10, 2003 at 05:31:39PM -0500, Daniel Jacobowitz wrote:
> > 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.
> Do you have pointers on where to look up those more complex things?
> Most of the symbols in libdv's assembly are merely referenced from other
> object files, only a couple are exported to apps. I've tried listing
> them in --exclude-symbols, but apparently this only sets the type from
> FUNC to NOTYPE; TEXTREL is still set.
In that case a linker (version) map is all you need. Search for
VERSION in the ld documentation. If you don't need to actually version
anything, you can just do:
list; of; exported; functions;
and then use -Wl,--version-script,FILENAME at link time. This is a
good idea for any shared library anyway.
MontaVista Software Debian GNU/Linux Developer