Date: Fri, 17 Sep 1999 17:49:37 -0400 (EDT) From: Thomas David Rivers <rivers@dignus.com> To: hackers@FreeBSD.ORG, peter@Taronga.COM Subject: Re: Minor numbers in shared libraries. Message-ID: <199909172149.RAA96311@lakes.dignus.com> In-Reply-To: <199909171715.MAA24311@bonkers.taronga.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909172149.RAA96311>