svn commit: r194298 - head/libexec/rtld-elf

Dmitry Morozovsky marck at rinet.ru
Tue Jun 16 20:20:00 UTC 2009


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 at 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 at freebsd.org"
AK> 

-- 
Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 marck at FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------


More information about the svn-src-head mailing list