Gentoo Archives: gentoo-user

From: Enrico Weigelt <weigelt@×××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: static-libs
Date: Sun, 12 Sep 2010 22:32:58
Message-Id: 20100912212029.GB25336@nibiru.local
In Reply to: Re: [gentoo-user] Re: static-libs by Andrea Conti
1 * Andrea Conti <alyf@××××.net> wrote:
2
3 > More importantly, code which is intended to be used in shared objects
4 > must be compiled with specific options as position-independent code,
5 > whereas code in an archive needs not.
6
7 Not necessarily. But it can't be shared at runtime anymore, since
8 the dynamic loader has to change the codepages for each process.
9 (well, there *is* a way ... back in a.out times libraries hat been
10 compiled/linked to specific address spaces, but obviously that's
11 quite complex to manage and not advisable outside speficic
12 embedded environments)
13
14 > You can't link dynamically against a library archive, so all DL code on
15 > Linux must be compiled as a shared object, whether it's actually shared
16 > or not (think plugins).
17
18 You can (apache did it once, aeons ago), but it's quite tricky,
19 and it's hard to get the pages shared between processes.
20 Not the recommended way.
21
22
23 cu
24 --
25 ----------------------------------------------------------------------
26 Enrico Weigelt, metux IT service -- http://www.metux.de/
27
28 phone: +49 36207 519931 email: weigelt@×××××.de
29 mobile: +49 151 27565287 icq: 210169427 skype: nekrad666
30 ----------------------------------------------------------------------
31 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
32 ----------------------------------------------------------------------