From owner-freebsd-hackers Fri Sep 17 14:49:50 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp1.vnet.net (smtp1.vnet.net [166.82.1.31]) by hub.freebsd.org (Postfix) with ESMTP id AA03614D40 for ; Fri, 17 Sep 1999 14:49:42 -0700 (PDT) (envelope-from rivers@dignus.com) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by smtp1.vnet.net (8.9.1a/8.9.1) with ESMTP id RAA13715; Fri, 17 Sep 1999 17:49:38 -0400 (EDT) Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3]) by dignus.com (8.9.2/8.8.5) with ESMTP id RAA80466; Fri, 17 Sep 1999 17:49:37 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.9.2/8.6.9) id RAA96311; Fri, 17 Sep 1999 17:49:37 -0400 (EDT) Date: Fri, 17 Sep 1999 17:49:37 -0400 (EDT) From: Thomas David Rivers Message-Id: <199909172149.RAA96311@lakes.dignus.com> To: hackers@FreeBSD.ORG, peter@Taronga.COM Subject: Re: Minor numbers in shared libraries. In-Reply-To: <199909171715.MAA24311@bonkers.taronga.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > In a discussion with Nate Williams, I have learned that the reason FreeBSD > doesn't use minor numbers with shared libraries because standard ELF doesn't > support it. Is this a hard-and-fast unbreakable rule, or is this something > that could be implemented if it can be done in a way that's compatible with > standard ELF? > > It seems to me that there should be a way of working around this, by adding > a field (either in a new section or an unused field (properly flagged with a > magic number) in the header) to communicate the minor version number to ld.so, > and having ld.so modify its search path by looking for X.so.M.N (where N >= > the number in the header), before X.so.M. This shouldn't break any "foreign" > libraries, nor break libraries created under FreeBSD when used on "foreign" > systems. > > Am I missing something really obvious here? > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > I would also add that you can "fake" a minor number by simple multiplication. You have to assume how many digits you want to allow in minor numbers. For example, if we assume a minor number has no more than 3 digits (allowing the minor numbers to grow to 999) then, M.N can readily be encoded as M*100+N. So, if M = 2 and N = 50, the Elf library number would be 2050. It doesn't look pretty when you do an ls. Also, you would want to "teach" the loaded about this. Just a thought - not really a suggestion - just a thought. - Dave Rivers - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message