From owner-freebsd-current@FreeBSD.ORG Thu Nov 27 10:53:31 2003 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 4131216A4CE for ; Thu, 27 Nov 2003 10:53:31 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE42843FE0 for ; Thu, 27 Nov 2003 10:53:29 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id hARIrTEG051024; Thu, 27 Nov 2003 10:53:29 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) hARIrTWx014901; Thu, 27 Nov 2003 10:53:29 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.10/8.12.10/Submit) id hARIrTen014900; Thu, 27 Nov 2003 10:53:29 -0800 (PST) (envelope-from marcel) Date: Thu, 27 Nov 2003 10:53:29 -0800 From: Marcel Moolenaar To: Terry Lambert Message-ID: <20031127185329.GA14849@dhcp01.pn.xcllnt.net> References: <3FC40572.142D4334@mindspring.com> <20031126024927.GA7743@dhcp01.pn.xcllnt.net> <3FC49986.14E86B70@mindspring.com> <20031126173004.GB10589@dhcp01.pn.xcllnt.net> <3FC5E2DA.EC4B0345@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FC5E2DA.EC4B0345@mindspring.com> User-Agent: Mutt/1.5.4i cc: "E.B. Dreger" cc: current@freebsd.org Subject: Re: rtld + static linking 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: Thu, 27 Nov 2003 18:53:31 -0000 On Thu, Nov 27, 2003 at 03:41:14AM -0800, Terry Lambert wrote: > > If you can get gcc and binutils to add the necessary support, then > > we can talk further. Until then it's academic. > > I think there are political reasons for not doing this. The > number one reason would be that you could load GPL'ed code as > a module into a non-GPL'ed program, and then use it without > neding to change your own license to GPL. The use of dlopen() does not circumvent that you're creating a modified version. The GPL-incompatible code and the GPL code do not communicate at arms length. Hence, the GPL-incompatible code is to be relicensed if the modified work is to be distributed.i Alternatively, ask the license holder for an exception or see if the library can be relicensed under the LGPL. >From a GPL licensing point of view dlopen() is no different than static linking. > > > I'll also point out that the ELF specification does not define static > > > linking *at all*. > > > > I think that's because it doesn't need any special mention. > > Well, it specifically mentions being able to do something like > linking libc to libresolv, so that you implicitly get the resolver > library when you explicitly link in the C library. That doesn't > work with static linking of ELF binaries, so I think we can either > say static linking is completely broken and needs to be fixed before > it is allowed to be used, or static linking is undefined by the ELF > standard. Recording dependencies in ELF files is specific to dynamic linking. In fact, there's nothing that you need to add to ELF headers or sections to make static linking work. It's irrelevant to an ELF specification. That's why it's not mentioned. Dynamic linking needs special headers and/or sections in the ELF file to make it work. I don't think you can infer from the ELF specification that static linking is undefined. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net