From owner-cvs-all@FreeBSD.ORG Fri Sep 15 20:18:50 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FE8416A40F; Fri, 15 Sep 2006 20:18:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AF4743D4C; Fri, 15 Sep 2006 20:18:49 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id k8FKImZE020660; Fri, 15 Sep 2006 16:18:48 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Konstantin Belousov Date: Fri, 15 Sep 2006 16:18:30 -0400 User-Agent: KMail/1.6.2 References: <200609081459.k88ExtSR084500@repoman.freebsd.org> In-Reply-To: <200609081459.k88ExtSR084500@repoman.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200609151618.31968.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88/1885/Fri Sep 15 07:19:10 2006 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/libexec/rtld-elf rtld.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 20:18:50 -0000 On Friday 08 September 2006 10:59 am, Konstantin Belousov wrote: > kib 2006-09-08 14:59:55 UTC > > FreeBSD src repository > > Modified files: > libexec/rtld-elf rtld.c > Log: > When looking up the symbol by dlsym, look it not only in the > object given as dso handle, but also in the implicit dependencies > of that dso. > > Also, const-ify the read-only parameter objlist of symlook_list. > > Reported by: "Simon 'corecode' Schubert" tum de> Approved by: kan (mentor) > X-MFC-After: 6.2 > > Revision Changes Path > 1.117 +10 -13 src/libexec/rtld-elf/rtld.c Unfortunately I found a serious regression, which broke OpenOffice.org build on -CURRENT: http://docs.freebsd.org/cgi/mid.cgi?200609142219.19636.nb_root My simple test case (inspired by an ancient PR) is here: http://people.freebsd.org/~jkim/rtld-regression.tar.bz Tested on: %sysctl -n kern.osreldate 700022 %uname -mr 7.0-CURRENT amd64 ------- BEFORE -------- %make test env LD_LIBRARY_PATH=. ldd main st1.so dl1.so dl2.so dl3.so main: libc.so.7 => /lib/libc.so.7 (0x800634000) st1.so: dl1.so: dl2.so (0x800e00000) dl3.so (0x800f01000) st1.so (0x801002000) dl2.so: dl3.so (0x800e00000) st1.so (0x800f01000) dl3.so: st1.so (0x800e00000) env LD_LIBRARY_PATH=. ./main dlopen/dlsym error: Undefined symbol "test_dl2" Test 1 FAILED!!! The dlopen() function is OK Test 2 PASSED!!! ----------------------- ------- AFTER -------- %make test env LD_LIBRARY_PATH=. ldd main st1.so dl1.so dl2.so dl3.so main: libc.so.7 => /lib/libc.so.7 (0x800634000) st1.so: dl1.so: dl2.so (0x800e00000) dl3.so (0x800f01000) st1.so (0x801002000) dl2.so: dl3.so (0x800e00000) st1.so (0x800f01000) dl3.so: st1.so (0x800e00000) env LD_LIBRARY_PATH=. ./main The dlopen() function is OK Test 1 PASSED!!! dlopen/dlsym error: Undefined symbol "test_dl2" Test 2 FAILED!!! ------------------------ As you can see, you fixed case 1 but broke case 2. Can you fix that? Thanks, Jung-uk Kim * PS: There were some reports that this patch has some performance/memory hit. Can you confirm that, too?