lookupSymbol API is unsafe
lookupSymbol is one of those functions that looks nice and innocuous on the tin, until you realize actually it doesn't actually do what you want, and seduces you into writing code that doesn't work on Mac OS X. Case in point, this recent test suite commit:
commit 02d4958903e967b78fc3bbceddc2ce8ce33901c0 Author: Edward Z. Yang <firstname.lastname@example.org> Date: Fri Sep 13 20:52:57 2013 -0700 Properly provide leading underscore when necessary. Signed-off-by: Edward Z. Yang <email@example.com>
Yes, the API is "correct" in some sense, but from a portability sense, we really want the function to add the underscore itself.
If we change this particular function, we will probably break most dynamic loading code (including GHC's). We could also add a safe variant of the function. We just need to decide something to do.