From owner-svn-src-all@FreeBSD.ORG Tue Jun 16 20:20:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F567106564A; Tue, 16 Jun 2009 20:20:00 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id C77EA8FC19; Tue, 16 Jun 2009 20:19:59 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5GKJwif061573; Wed, 17 Jun 2009 00:19:58 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Wed, 17 Jun 2009 00:19:58 +0400 (MSD) From: Dmitry Morozovsky To: Alexander Kabaev In-Reply-To: <200906161638.n5GGcsRQ033650@svn.freebsd.org> Message-ID: References: <200906161638.n5GGcsRQ033650@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Wed, 17 Jun 2009 00:19:58 +0400 (MSD) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r194298 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 20:20:00 -0000 On Tue, 16 Jun 2009, Alexander Kabaev wrote: AK> Author: kan AK> Date: Tue Jun 16 16:38:54 2009 AK> New Revision: 194298 AK> URL: http://svn.freebsd.org/changeset/base/194298 AK> AK> Log: AK> FreeBSD returns main object handle from dlopen(NULL, ...) calls. AK> dlsym seaches using this handle are expected to look for symbol AK> definitions in all objects loaded at the program start time along AK> with all objects currently in RTLD_GLOBAL scope. AK> AK> Discussed with: kib AK> Reported by: Maho NAKATA AK> MFC after: 2 weeks AK> AK> Modified: AK> head/libexec/rtld-elf/rtld.c AK> AK> Modified: head/libexec/rtld-elf/rtld.c AK> ============================================================================== AK> --- head/libexec/rtld-elf/rtld.c Tue Jun 16 15:30:10 2009 (r194297) AK> +++ head/libexec/rtld-elf/rtld.c Tue Jun 16 16:38:54 2009 (r194298) AK> @@ -2130,6 +2130,16 @@ do_dlsym(void *handle, const char *name, AK> /* Search main program and all libraries loaded by it. */ AK> def = symlook_list(name, hash, &list_main, &defobj, ve, flags, AK> &donelist); AK> + AK> + /* AK> + * We do not distinguish between 'main' object an global scope. ~~~~~~~~~ typo? AK> + * If symbol is not defined by objects loaded at startup, continue AK> + * search among dynamically loaded objects with RTLD_GLOBAL AK> + * scope. AK> + */ AK> + if (def == NULL) AK> + def = symlook_list(name, hash, &list_global, &defobj, ve, AK> + flags, &donelist); AK> } else { AK> Needed_Entry fake; AK> AK> _______________________________________________ AK> svn-src-all@freebsd.org mailing list AK> http://lists.freebsd.org/mailman/listinfo/svn-src-all AK> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" AK> -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------