From owner-freebsd-hackers Fri Feb 8 3:42:37 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from falcon.prod.itd.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id 5EED637B404; Fri, 8 Feb 2002 03:42:33 -0800 (PST) Received: from pool0031.cvx22-bradley.dialup.earthlink.net ([209.179.198.31] helo=mindspring.com) by falcon.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16Z9Q8-0001R4-00; Fri, 08 Feb 2002 03:42:24 -0800 Message-ID: <3C63B898.65E99472@mindspring.com> Date: Fri, 08 Feb 2002 03:38:00 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Maxim Sobolev Cc: jdp@FreeBSD.org, deischen@FreeBSD.org, jasone@FreeBSD.org, hackers@FreeBSD.org, jlemon@FreeBSD.org Subject: Re: Linking libc before libc_r into application causes weird problems References: <1013147180.73417.2.camel@notebook> <3C637097.13B8C35A@mindspring.com> <3C63973F.111CF6D1@FreeBSD.org> <3C63A4C1.7C2CEEDF@mindspring.com> <3C63B14E.516941C4@FreeBSD.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Maxim Sobolev wrote: > When you are linking with shared libraries you do not need to specify > them in the "correct" order, because AFAIK linker takes care of that > using dependency information recorded within each shared library. > Correct order only required for static libraries that do not have a > way to record a dependency information. Libraries are not all int he same dependency space. It's possible to have a shared library that is linked against libc_r.so.3, and have the rest of the program linked against libc.so.4 (e.g. if there were a .init that started a thread in the library when the program was invoked, in order to service requests made via an IPC, also defined by the library). Likewise, it's possible for different interface versions to coexist in a program, so long as there are no relied upon interactions (e.g. a static buffer being blown by one thread for use by another). The relationship between libraries is not flat, it's hierarchical, or at least is supposed to be able to be, according to the ELF spec.. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message