diff options
Diffstat (limited to 'rts/Linker.c')
-rw-r--r-- | rts/Linker.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/rts/Linker.c b/rts/Linker.c index 6be9a5a030..98969b94a8 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -107,9 +107,6 @@ # include <mach-o/loader.h> # include <mach-o/nlist.h> # include <mach-o/reloc.h> -#if !defined(HAVE_DLFCN_H) -# include <mach-o/dyld.h> -#endif #if defined(powerpc_HOST_ARCH) # include <mach-o/ppc/reloc.h> #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; |