Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 1999 17:56:19 -0500 (CDT)
From:      peter@taronga.com (Peter da Silva)
To:        rivers@dignus.com (Thomas David Rivers)
Cc:        hackers@FreeBSD.ORG, peter@Taronga.COM
Subject:   Re: Minor numbers in shared libraries.
Message-ID:  <19990917225619.887AF322E3@citadel.in.taronga.com>
In-Reply-To: <199909172149.RAA96311@lakes.dignus.com> from Thomas David Rivers at "Sep 17, 1999 05:49:37 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
>  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.

250, I think you mean. This is good, but you would still need to modify
ld.so to know about this, so it'll load ld.so.208 (or version 2.8) when
you specified 204 (v 2.4), but won't load ld.so.301 (v 3.1).

>  It doesn't look pretty when you do an ls.

Since ld.so knows about it anyway, you could have it parse file names
appropriately, so the version number on the file itself can remain
dotted, with a symlink like X.so.2 -> X.so.2.8 to make things easier
for mere humans.

The problem is that this is less compatible with forign version numbers,
unless you had a patch program that applied the appropriate multiplicative
factor to the version number when you imported it.

How big is the version number field in elf anyway? If it's big enough, you
could just arbitrarily say something like "version numbers below 10000 are
treated literally, otherwise subtract 10000 and divide by 100 then take
the quotient and remainder as the major and minor numbers".



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?19990917225619.887AF322E3>