[Patch] Clean up DynamicLibrary


Attached patch moves code around; it should not have a functional
effect. It formalizes a few concepts that were spread over several files
before, depending on platform. It removes historical leftovers.

Symbol lookup now happens in three easy phases, on all platforms:
* explicitly provided symbols through AddSymbol()
* shared libraries
* platform provided "special" symbols.

No more "strcmp" for each special symbol; they are collected once in a
StringMap. Unix and Windows are now strictly symmetric: there is a
defined set of routines that a platform has to provide.

Does this make sense? (Note that the actual checkin will remove
SearchForAddressOfSpecialSymbol.cpp; svn diff is not very helpful here...)

We need the ability to determine all shared libraries loaded into a
process; currently that's only available for Windows and not very
explicitly. Is there interest to have this in llvm::DynamicLibrary, or
shall I keep this to ourselves?

Cheers, Axel.

llvm-dylib-reshuffle.diff (19.9 KB)