diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2015-10-29 12:59:30 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2015-10-29 13:01:25 +1100 |
commit | 776d55c89fb657706b5476c32629fd032ea54596 (patch) | |
tree | 6eab48dd260dccb4e3fe7aa73ea1f007e04fccbd /rts | |
parent | c1e1584aa175a1c4341ffa1c1f548c2f7513a331 (diff) | |
download | haskell-776d55c89fb657706b5476c32629fd032ea54596.tar.gz |
rts/Linker.c: Drop support for legacy OS X dyn loading
Drop support for old OS X (OS X 10.2 and earlier) dynamic linking.
10.3 was released in 2003.
Test Plan: Validate on OS X and Linux.
Reviewers: bgamari, thomie, austin
Reviewed By: thomie, austin
Differential Revision: https://phabricator.haskell.org/D1393
Diffstat (limited to 'rts')
-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; |