This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Versioning mess proved!!!
I get
[geoffk@thief geoffk]$ cat > tA2.c
#include <stdio.h>
#include <dlfcn.h>
extern void foo(void) __attribute__((weak));
int main(void)
{
void (*foop) (void) = foo;
asm volatile ("" : "=r" (foop) : "0" (foop));
printf ("%p\n", foop);
if (foop)
foop();
return 0;
}
[geoffk@thief geoffk]$ gcc tA2.c -o tA2
[geoffk@thief geoffk]$ ./tA2
(nil)
[geoffk@thief geoffk]$ LD_PRELOAD=./tB.so ./tA2
(nil)
on x86-linux.
--
- Geoffrey Keating <geoffk@cygnus.com>