[Gllug] pimping my elf

Christian Smith csmith at thewrongchristian.org.uk
Wed Jun 14 16:40:47 UTC 2006


Alex Sayle uttered:

>
> On 14 Jun 2006, at 16:29BDT, Christian Smith wrote:
>> 
>> Don't bother. There lies pain.
>> 
>> If you get pain for not doing this, ask your colleagues to justify why 
>> libraries names should be changed. If they do anything more than scratch 
>> their heads, or say "we've always done it this way" then they really can't 
>> come up with a reasonable excuse for this behaviour.
>> 
>> It's just an insane scheme.
>
> Actually... it isn't completely insane, its only a little bit insane.
> I though the same thing when I first started.
>
> The simple case, yes, going again the grain works but then comes the
> case where the libraries don't have enough version information to be
> distinguished. Say libbar4.2.1 comes out, and yet it still produces
> libbar.so.4.2, or in the case of many build scripts that simply link
> against libbar.so.0.


Version X.Y.Z should be compatible with version X.Y. If not, then the 
library is broken and arguably should be removed.


>
> In these cases the link target still needs to be modified to load the
> explicit version number.


The name of the library is encoded in the library itself. Chances are, 
libbar.so.4.2.1 and libbar.so.4.2.0 are both libbar.so.4.2. In fact, just 
as likely, the library would be libbar.so.4.

ldd a binary to see what the library soname is expected.


>
> The alternative is to chain humungously long LD_LIBRARY_PATH which has
> limits to on how long an environment variable data size can be, plus
> I think its far more kludgy.
>

As can be seen by your OP, you'll have a bigger headache renaming files 
and updating ELF headers before you run out of enironment space. I can't 
find any mention of the environment being limited other than on Windows 
(which appears to be 64K).

Plus, you'll have to update any and all binaries that are periodically 
updated. Environment variables are easy to manage by comparison.


Christian

--
     /"\
     \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
      X                           - AGAINST MS ATTACHMENTS
     / \
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list