Gentoo Archives: gentoo-user

From: "b.n." <brullonulla@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] "prelink" a dynamic library
Date: Fri, 03 Oct 2008 17:33:06
Message-Id: 48E65B37.1080708@gmail.com
In Reply to: Re: [gentoo-user] "prelink" a dynamic library by Helmut Jarausch
1 Helmut Jarausch ha scritto:
2 > On 2 Oct, bzk0711@×××.com wrote:
3 >> On Wed, 01 Oct 2008 18:53:04 +0200 (CEST)
4 >> Helmut Jarausch <jarausch@××××××××××××××××.de> wrote:
5 >>
6 >>> Hi,
7 >> Hello Helmut,
8 >>
9 >>> I want to create a shared library, say libULIB.so,
10 >>> which needs additional shared libraries, e.g. libmpfr.so and
11 >>> libgmp.so .
12 >>>
13 >>> My users only use the functions provided by libULIB.so.
14 >>>
15 >>> Is there a means to "prelink" libULIB.so, so that the libraries
16 >>> libmpfr.so and libgmp.so are not needed by the user?
17 >> You should be able to just provide the libraries to the linker when
18 >> linking your shared object. When *running* the application, your shared
19 >> object (i.e. the loader) should transitively pull in the libs on which
20 >> yours depends. You can check those dependencies using ldd <your-lib>.
21 >>
22 >> Hope this helps,
23 >> Patric
24 >
25 > Thanks Patric, but unfortunately that's not what I want.
26 > In this case, these "secondary" libraries (e.g. libmpfr.so and
27 > libgmp.so) have to be present on the target machines together
28 > with an 'rpath' if they are in non-standard directories.
29 >
30 > My aim was to let the linker generate a big library which
31 > obseletes the secondary libraries.
32
33 If I understand correctly, you want them to be statically linked.
34
35 m.