> > 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 majord...@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 majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message