Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] LD_ASSUME_KERNEL (was: Re: Re: lib tls thread safeness)



h@realh.co.uk(Tony Houghton)  14.12.04 13:31

>In <20041214125620.GA1269@suse.de>, Ludwig Nussel wrote:

>> http://people.redhat.com/drepper/assumekernel.html

>The trouble with that article is that it doesn't explain
>LD_ASSUME_KERNEL at all. 

Not? Hm...


>A bit like all those so-called HOWTOs and
>MANUALs which have loads of technical background on how a program
>works but have no info whatsoever on how to use it.

Yes.
I understand it this way:


LD_ASSUME_KERNEL is handled by the "dynamic linker" only for glibc.

LD_ASSUME_KERNEL defines the minimum ABI (Application Binary Interface)
Version the program needs.
All higher versions are (supposed to be) compatible.


For RHL9, and Fedora Core 1 and 2 (IA-32 architecture only) this leads to:

/lib/tls need ABI version 2.4.20, which uses NPTL
/lib/i686 need ABI version 2.4.1, which uses LinuxThreads code
/lib need ABI version 2.2.5, which uses an obsolete LinuxThreads version.

This is in the order the library paths are searched 
by the dynamic loader to.

Command to determine the ABI version(see "elfutils"):
$ eu-readelf -n /lib/tls/libc-2.3.3.so



Explicit:

LD_ASSUME_KERNEL=  means:
Use any out of /lib/tls /lib/i686 /lib, which ever you find first
in this search order.

LD_ASSUME_KERNEL=2.2.5 to LD_ASSUME_KERNEL=2.4.0 means
Use /lib


LD_ASSUME_KERNEL=2.4.1 to LD_ASSUME_KERNEL=2.4.19 means:
Use /lib/i686

LD_ASSUME_KERNEL=2.4.20 and up means:
Use /lib/tls

For more detailed information have a look into the source code
of the dynamic linker...

Source:
 http://people.redhat.com/drepper/assumekernel.html

Interessting:

While Bacular blames NPTL (tls) to be defective, Red Hat blames the
applications(plural!):
  For the Red Hat releases this layout was chosen to provide 
  the maximum amount of backward compatibility for broken 
  applications (correctly written applications have no problems anyway).

Gee, that helps the users sooo much...
and: Anyone ever saw a nontrivial "correctly written application"?
Me not...

Rainer





Home | Main Index | Thread Index