Date: Fri, 3 Apr 2009 19:17:23 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/libc/gen Makefile.inc dlfcn.c dlfunc.c src/libexec/rtld-elf Symbol.map rtld.c Message-ID: <200904031921.n33JLgBU099084@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2009-04-03 19:17:23 UTC FreeBSD src repository Modified files: lib/libc/gen Makefile.inc dlfcn.c libexec/rtld-elf Symbol.map rtld.c Removed files: lib/libc/gen dlfunc.c Log: SVN rev 190673 on 2009-04-03 19:17:23Z by kib 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 Revision Changes Path 1.142 +1 -1 src/lib/libc/gen/Makefile.inc 1.16 +8 -0 src/lib/libc/gen/dlfcn.c 1.4 +0 -30 src/lib/libc/gen/dlfunc.c (dead) 1.7 +1 -0 src/libexec/rtld-elf/Symbol.map 1.134 +14 -0 src/libexec/rtld-elf/rtld.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904031921.n33JLgBU099084>