I want to use Valgrind with OpenGL applications, but my
distribution uses ELF TLS, and Valgrind cannot yet deal with NVIDIA's
ELF TLS OpenGL.
You can set the environment variable LD_ASSUME_KERNEL to something
below "2.3.99" (for example: `export LD_ASSUME_KERNEL 2.3.98`).
NVIDIA's OpenGL libraries contain an OS ABI ELF note that indicates
the minimum kernel version that is required to use the library.
The ELF TLS OpenGL libraries have an OS ABI of 2.3.99 (the first
Linux kernel that contained the necessary LDT support for ELF TLS),
while the non ELF TLS OpenGL libraries contain an OS ABI of 2.2.5.
The run-time loader will not load libraries with an OS ABI greater
than the current kernel version. The LD_ASSUME_KERNEL environment
variable can be used to override the kernel version that the run-time
loader uses in this test.
By setting LD_ASSUME_KERNEL to any kernel version below 2.3.99,
you can force the loader to not use the ELF TLS OpenGL libraries,
and fall back to the regular OpenGL libraries.
If, for some reason, you need to remove this OS ABI note from the
NVIDIA OpenGL libraries, you can do so by passing the .run file the
"--no-abi-note" option during installation.