From owner-cvs-src-old@FreeBSD.ORG Fri Jan 28 23:45:13 2011 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 B5F9710656E0 for ; Fri, 28 Jan 2011 23:45:13 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 71DC88FC12 for ; Fri, 28 Jan 2011 23:45:05 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p0SNj5jb074792 for ; Fri, 28 Jan 2011 23:45:05 GMT (envelope-from kan@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p0SNj5NY074791 for cvs-src-old@freebsd.org; Fri, 28 Jan 2011 23:45:05 GMT (envelope-from kan@repoman.freebsd.org) Message-Id: <201101282345.p0SNj5NY074791@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kan@repoman.freebsd.org using -f From: Alexander Kabaev Date: Fri, 28 Jan 2011 23:44:57 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/libexec/rtld-elf 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, 28 Jan 2011 23:45:13 -0000 kan 2011-01-28 23:44:57 UTC FreeBSD src repository Modified files: libexec/rtld-elf rtld.c Log: SVN rev 218051 on 2011-01-28 23:44:57Z by kan Eliminate the use of symlook_needed function in favor of DAGS. Place elements on DAG lists in breadth-first order. This allows us to walk pre-built list in all cases where breadth-first dependency chain enumeration is required. Fix dlsym on special handle obtained by dlopen(NULL, ...) to do what comment claims it does. Take advantage of recently added symlook_global function to iterate over main objects and global DAGs lists properly in search of a symbol. Since rtld itself provides part of the global namespace, search rtld_obj too. Remove recursion from init_dag and symlook_needed functions. Use symlook_needed for ELF filtee processing only and change lookup order used in the function to match the order used by Solaris runtime linker under same circumstances. While there, fix weak symbol handling in the loop so that we return the first weak symbol definition if no strong one was found, instead of the last one. Reviewed by: kib MFC after: 1 month Revision Changes Path 1.170 +47 -67 src/libexec/rtld-elf/rtld.c