blob: b0bb92627ee38ce3778981c7e30a96c2df9579aa [file] [log] [blame]
#include <stdio.h>
#include <mach-o/dyld.h>
main ()
{
fputs ("hi\n", stdout);
fputs ("there\n", stdout);
puts ("test"); /* this call will always go to libSystem, even though it is defined in mylib.dylib */
if (NSIsSymbolNameDefined ("_foo")) {
int (*addr)(void) =
NSAddressOfSymbol (NSLookupAndBindSymbol ("_foo"));
if (addr) {
addr ();
}
}
}