kripken/emscripten — pull request #1367 by int3 (2013-07-12 03:46:37+00:00)
Title: Implement self-dlopen. Closes #1359.

Caveats: I'm not sure how this impacts the old shared library code, since the tests have all degenerated since the feature was deprecated. I tried building a simple shared module using the code on `incoming` and also ran into problems. Perhaps I'm doing it wrong? I couldn't find much documentation on this, so I just used the `BUILD_AS_SHARED_LIBRARY` environment variable. Nonetheless, as long as one sticks to calling dlopen with just `NULL`, things should work fine. I am opening this PR to get comments first, and will work on integrating it with `dlopen` on external libraries later if deemed necessary.