Fixed support for RTLD_NEXT in dlsym()

The previous implementation of this flag was broken--it behaved identically
to RTLD_DEFAULT.  This adds a proper implementation, which examines the address
of the calling function, and uses it to determine which library to use to begin
the symbol search process.

Change-Id: I2ad2b46363f68932af63a3828a22f9c7987eea67
3 files changed