6 Aug 2003 23:55
dlsym RTLD_NEXT fix
Nick Hudson <skrll <at> netbsd.org>
2003-08-06 21:55:28 GMT
2003-08-06 21:55:28 GMT
dlsym(RTLD_NEXT,...) is currently broken. The reason is dlsym uses __builtin_return_address(0) to determine the caller's shared object, but the call is done via the dlsym stub in either crt0 or libc. The attached fix is based on how FreeBSD ld.so resolves the dlsym and friends symbols directly to the ld.so versions. This solution has a number of benefits including - backwards compatibility maintained and existing binaries are fixed. - __mainprog_obj can be removed from crt0.o - we do the same thing as FreeBSD OK to commit? Nick
RSS Feed