Back to index

glibc  2.9
testobj1.c
Go to the documentation of this file.
00001 #include <dlfcn.h>
00002 #include <stdlib.h>
00003 
00004 #include "testobj.h"
00005 
00006 int
00007 obj1func1 (int a __attribute__ ((unused)))
00008 {
00009   return 42;
00010 }
00011 
00012 int
00013 obj1func2 (int a)
00014 {
00015   return foo (a) + 10;
00016 }
00017 
00018 int
00019 preload (int a)
00020 {
00021   int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
00022   if (fp != NULL)
00023     return fp (a) + 10;
00024   return 10;
00025 }