X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=blobdiff_plain;f=elf%2Ftestobj3.c;h=d8ede36916b3a23bf66e0bc77ae84bad35bee344;hp=8e3d8865f70dd349d65675473b3eefc195f794f7;hb=1d42347e27bfa3b94529af46f3eb11f258faf01c;hpb=b0c41972264fea6a4cb37f267cdd6212b881e828 diff --git a/elf/testobj3.c b/elf/testobj3.c index 8e3d8865f7..d8ede36916 100644 --- a/elf/testobj3.c +++ b/elf/testobj3.c @@ -1,3 +1,8 @@ +#include +#include + +extern int foo (int); + int obj3func1 (int a __attribute__ ((unused))) { @@ -9,3 +14,12 @@ obj3func2 (int a) { return foo (a) + 42; } + +int +preload (int a) +{ + int (*fp) (int) = dlsym (RTLD_NEXT, "preload"); + if (fp != NULL) + return fp (a) + 10; + return 10; +}