Date: Wed, 17 Jun 2009 00:19:58 +0400 (MSD) From: Dmitry Morozovsky <marck@rinet.ru> To: Alexander Kabaev <kan@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r194298 - head/libexec/rtld-elf Message-ID: <alpine.BSF.2.00.0906170019430.61544@woozle.rinet.ru> In-Reply-To: <200906161638.n5GGcsRQ033650@svn.freebsd.org> References: <200906161638.n5GGcsRQ033650@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 *** ------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0906170019430.61544>