Use dlsym on OS X if available
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 5 Sep 2007 05:22:13 +0000 (05:22 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 5 Sep 2007 05:22:13 +0000 (05:22 +0000)
commit6f69004ae9aa595ad439771fa41b0feeb118810b
treee55fe78fd6209768f6edd14e2b4ce48a2408a9da
parentc4b993f3433777eb070de3090d76754cd6b4e2ec
Use dlsym on OS X if available

On OS X 10.4 and newer, we have to use dlsym because the old NS* interface has
been deprecated. The patch checks for HAVE_DLFCN_H instead of switching on
the OS version.

There is one additional quirk: although OS X prefixes global symbols with an
underscore, dlsym expects its argument NOT to have a leading underscore. As a
hack, we simply strip it off in lookupSymbol. Something a bit more elaborate
might be cleaner.
rts/Linker.c