Well, on old programs, one often meets
symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
error, so I made a little library with
Code:
extern int (* __errno_location);
int errno()
{
return(*__errno_location);
}
and preload this library with LD_PRELOAD. This always me to use olds programs like Maple 5 or 7 on recent linux (Debian Etch for instance). But since libc 2.7 there is errors if I try to recompile this library, looking what gcc -E gives to #include <errno.h> and i=errno(); I change this program to
Code:
extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
int errno ()
{
return((*__errno_location ()));
}
good compilation but
Code:
$ gcc -shared -Wl,-soname,lib-errno -o lib-errno.so lib-errno.o
give
errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS definition in lib-errno.o section .tex
I try to find your pseudo code or something like in the includes files but I fails. Do you have a suggestion?
Sorry if you think I stool the thread, but I thought it's the same subject.
Really sorry for my English, I'm French and try to write good English but... see the result