ld, ld.so and -symbolic

Paul Kranenburg pk@cs.few.eur.nl
Sun Jun 18 03:40:00 GMT 1995

> > The question has to do with the -symbolic option that gcc man pages say is
> > a linker option, but ld does not seem to support.  My understanding on sun
> > solaris is that the -Bsymbolic option  allows me to have two, or more, shared 
> > objects that can have there own global variables, that won't conflict with 
> > other variables of the same name.  The question I have is, is this supported,
> > can it be supported, when, how, how much?

You'd have to make sure that 1) all symbols get resolved, i.e. no
references to undefined remain in the shared object, and 2) all
remaining relocation records are of the type "relative to load address".
The latter is a hard requirement if you have to bootstrap a la "ld.so".

You'll need to have a library handy from which you can pull in all
required PIC modules, e.g. say "libc_pic.a" (in stead of "libc.so.x.y").


More information about the Gas2 mailing list