xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.base/so-impl-ld.c (revision a5a4af3bd380a7b58b758d9b311cef9f7c34aeb4)
1*a5a4af3bSchristos /* This program is linked against SOM shared libraries, which the loader
2*a5a4af3bSchristos    automatically loads along with the program itself).
3*a5a4af3bSchristos    */
4*a5a4af3bSchristos 
5*a5a4af3bSchristos #include <stdio.h>
6*a5a4af3bSchristos 
7*a5a4af3bSchristos #if defined(__cplusplus) || defined(__STDCPP__)
8*a5a4af3bSchristos extern "C" int  solib_main (int  arg);
9*a5a4af3bSchristos #else
10*a5a4af3bSchristos int  solib_main (int  arg);
11*a5a4af3bSchristos #endif
12*a5a4af3bSchristos 
main()13*a5a4af3bSchristos int main ()
14*a5a4af3bSchristos {
15*a5a4af3bSchristos   int  result;
16*a5a4af3bSchristos 
17*a5a4af3bSchristos   /* Call a shlib function. */
18*a5a4af3bSchristos   result = solib_main (100);
19*a5a4af3bSchristos 
20*a5a4af3bSchristos   /* Call it again. */
21*a5a4af3bSchristos   result = solib_main (result);
22*a5a4af3bSchristos   return 0;
23*a5a4af3bSchristos }
24