From owner-freebsd-current@FreeBSD.ORG Fri Feb 6 23:27:18 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A8FA16A4CE; Fri, 6 Feb 2004 23:27:18 -0800 (PST) Received: from VARK.homeunix.com (adsl-68-122-2-18.dsl.pltn13.pacbell.net [68.122.2.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 189D143D1F; Fri, 6 Feb 2004 23:27:17 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.10/8.12.10) with ESMTP id i177RFKW001420; Fri, 6 Feb 2004 23:27:15 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.10/8.12.10/Submit) id i177RF0n001419; Fri, 6 Feb 2004 23:27:15 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Fri, 6 Feb 2004 23:27:10 -0800 From: David Schultz To: "M. Warner Losh" Message-ID: <20040207072710.GA1369@VARK.homeunix.com> Mail-Followup-To: "M. Warner Losh" , scottl@FreeBSD.ORG, nectar@FreeBSD.ORG, deischen@FreeBSD.ORG, current@FreeBSD.ORG, ports@FreeBSD.ORG References: <20040205072422.GB11291@VARK.homeunix.com> <4023C100.2090305@freebsd.org> <20040207005520.GA7132@VARK.homeunix.com> <20040207.000718.29363133.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040207.000718.29363133.imp@bsdimp.com> cc: nectar@FreeBSD.ORG cc: deischen@FreeBSD.ORG cc: scottl@FreeBSD.ORG cc: current@FreeBSD.ORG cc: ports@FreeBSD.ORG Subject: Re: HEADS UP: libkse -> libpthread switch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2004 07:27:18 -0000 On Sat, Feb 07, 2004, M. Warner Losh wrote: > In message: <20040207005520.GA7132@VARK.homeunix.com> > David Schultz writes: > : Maybe I don't understand dynamic linking in FreeBSD well enough, > : but an application that is both statically and dynamically linked > : against the same library seems bizarre and unusual to me. > : Wouldn't the two halves reference different copies of the library, > : breaking things like malloc() and gethostbyname() (in the > : hypothetical case of libc)? I don't see how such a thing could > : possibly work in the first place. > > Such a thing is possible if at the time you built library X, it > required library Y shared. You then build program A that requires > library X and Y, but link Y static. Bad things happen after that. > Esp if Y is libc or libc_r. Yeah, I understand how it can happen, and I've even seen it on a Solaris box.[1] But Scott's message seems to imply that partially statically linked binaries work right now, and that we need to keep it that way moving into the next release, even at the expense of potentially breaking fully dynamic binaries. Perhaps he meant something else. [1] My initial thought was that FreeBSD did something differently such that this could work in FreeBSD but not in Solaris, but I just tried it and this is not the case.