diff --git a/rts/Linker.c b/rts/Linker.c index 6be9a5a03032752901fc8b2e7986366f1e35b584..98969b94a8c38b406aa7a69ab716f105fab7dc8b 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -107,9 +107,6 @@ # include # include # include -#if !defined(HAVE_DLFCN_H) -# include -#endif #if defined(powerpc_HOST_ARCH) # include #endif @@ -914,11 +911,8 @@ static void* lookupSymbol_ (char *lbl) # if defined(OBJFORMAT_ELF) return internal_dlsym(lbl); # elif defined(OBJFORMAT_MACHO) -# if HAVE_DLFCN_H - /* On OS X 10.3 and later, we use dlsym instead of the old legacy - interface. - HACK: On OS X, all symbols are prefixed with an underscore. + /* HACK: On OS X, all symbols are prefixed with an underscore. However, dlsym wants us to omit the leading underscore from the symbol name -- the dlsym routine puts it back on before searching for the symbol. For now, we simply strip it off here (and ONLY @@ -927,14 +921,6 @@ static void* lookupSymbol_ (char *lbl) IF_DEBUG(linker, debugBelch("lookupSymbol: looking up %s with dlsym\n", lbl)); ASSERT(lbl[0] == '_'); return internal_dlsym(lbl + 1); -# else - if (NSIsSymbolNameDefined(lbl)) { - NSSymbol symbol = NSLookupAndBindSymbol(lbl); - return NSAddressOfSymbol(symbol); - } else { - return NULL; - } -# endif /* HAVE_DLFCN_H */ # elif defined(OBJFORMAT_PEi386) void* sym;