From owner-cvs-src-old@FreeBSD.ORG Fri Apr 3 19:21:42 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9EC01065679 for ; Fri, 3 Apr 2009 19:21:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A03BA8FC1C for ; Fri, 3 Apr 2009 19:21:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n33JLg4m099085 for ; Fri, 3 Apr 2009 19:21:42 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n33JLgBU099084 for cvs-src-old@freebsd.org; Fri, 3 Apr 2009 19:21:42 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200904031921.n33JLgBU099084@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Fri, 3 Apr 2009 19:17:23 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/gen Makefile.inc dlfcn.c dlfunc.c src/libexec/rtld-elf Symbol.map rtld.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 19:21:45 -0000 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 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