[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Linking against indirect dependencies
From: |
Howard Chu |
Subject: |
RE: Linking against indirect dependencies |
Date: |
Sat, 29 May 2004 14:06:10 -0700 |
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of Alexandre Oliva
> On May 28, 2004, Szombathelyi György <address@hidden> 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
- Re: Linking against indirect dependencies, (continued)
- Re: Linking against indirect dependencies, Szombathelyi György, 2004/05/25
- Re: Linking against indirect dependencies, Albert Chin, 2004/05/25
- Re: Linking against indirect dependencies, Szombathelyi György, 2004/05/26
- Re: Linking against indirect dependencies, Bob Friesenhahn, 2004/05/26
- Re: Linking against indirect dependencies, Alexandre Oliva, 2004/05/29
- Re: Linking against indirect dependencies, Szombathelyi György, 2004/05/29
- Re: Linking against indirect dependencies, Alexandre Oliva, 2004/05/29
- RE: Linking against indirect dependencies,
Howard Chu <=
- Re: Linking against indirect dependencies, Szombathelyi György, 2004/05/31
- Re: Linking against indirect dependencies, Scott James Remnant, 2004/05/26
- Re: Linking against indirect dependencies, Szombathelyi György, 2004/05/27
Re: Linking against indirect dependencies, Szombathelyi György, 2004/05/26