binutils-gdb/gdb/testsuite/gdb.base/so-indr-cl.c

31 lines
521 B
C
Raw Normal View History

/* This program is linked against SOM shared libraries, which the loader
automatically loads along with the program itself).
*/
#include <stdio.h>
1999-06-28 18:06:02 +02:00
#ifdef PROTOTYPES
extern "C" int solib_main (int);
1999-06-28 18:06:02 +02:00
static int
solib_wrapper (int (*function)(int))
#else
extern int solib_main (int);
static int
solib_wrapper (function)
int (*function)(int);
1999-06-28 18:06:02 +02:00
#endif
{
return (*function)(100);
}
1999-06-28 18:06:02 +02:00
int main ()
{
int result;
/* This is an indirect call to solib_main. */
result = solib_wrapper (solib_main);
1999-06-28 18:06:02 +02:00
return 0;
}