This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

why there are twice relocations on ld.so?



use glibc 2.1.3.

both in file rtld.c:
	the first relocation takeplace in router _dl_start,source code as follow:
		ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0); 
and the second relocation takeplace in router dl_main,source code as follow:
	if (_dl_rtld_map.l_opencount > 0)
    {
	  /* There was an explicit ref to the dynamic linker as a shared lib.
	   Re-relocate ourselves with user-controlled symbol definitions.  */
	  HP_TIMING_NOW (start);
	  _dl_relocate_object (&_dl_rtld_map, _dl_loaded->l_scope, 0, 0);
	  HP_TIMING_NOW (stop);
	  HP_TIMING_DIFF (add, start, stop);
	  HP_TIMING_ACCUM_NT (relocate_time, add);
    }

i think it need only one time;any hint?

              shenhui@arch.cs.pku.edu.cn
                 2002-04-12

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]