> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Alexandre Oliva

> On May 28, 2004, Szombathelyi GyÃrgy <[EMAIL PROTECTED]> wrote:
> 
> > AFAIK it's possible to link in libdep to libfoo if libdep is static
> 
> Depends on the platform.  Some combinations of OSs, ABIs and hardware
> architectures don't allow non-PIC in shared libraries.  Yes, several
> of the platforms that don't support this are GNU/Linux ports.
> 
> Try this on x86_64-linux-gnu, for example.  It won't work, unless you
> somehow arrange for libdep.o to not contain any relocations that
> aren't PIC.

I come across this situation from time to time, and I've had to just manually create 
an archive of PIC object files so that it can be linked into the shared library. 
Generally a PIC static library is usable in static executables as well, as long as 
*something* (e.g. libc) was dynamically linked (thus forcing the PLT or whatever 
dynamic init code to be present).

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support 



_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to