why there are twice relocations on ld.so?
慎辉
shenhui@arch.cs.pku.edu.cn
Thu Apr 11 18:03:00 GMT 2002
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
More information about the Binutils
mailing list