freebsd-skq/libexec/rtld-elf/Symbol.map
Konstantin Belousov c8da4f07d7 Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).
dlfunc() called dlsym() to do the work, and dlsym() determines the dso
that originating the call by the return address. Due to this, dlfunc()
operated as if the caller is always the libc.

To fix this, move the dlfunc() to rtld, where it can call the internal
implementation of dlsym, and still correctly fetch return address.
Provide usual weak stub for the symbol from libc for static binaries.
dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to
override dlfunc@FBSD_1.0 weak symbol, exported by libc.

Reported, analyzed and tested by:	Tijl Coosemans <tijl ulyssis org>
PR: standards/133339
Reviewed by:	kan
2009-04-03 19:17:23 +00:00

28 lines
359 B
Plaintext

/*
* $FreeBSD$
*/
FBSD_1.0 {
_rtld_error;
dlclose;
dlerror;
dlopen;
dlsym;
dlfunc;
dlvsym;
dladdr;
dllockinit;
dlinfo;
dl_iterate_phdr;
r_debug_state;
__tls_get_addr;
};
FBSDprivate_1.0 {
_rtld_thread_init;
_rtld_allocate_tls;
_rtld_free_tls;
_rtld_atfork_pre;
_rtld_atfork_post;
};