This is the mail archive of the
mailing list for the binutils project.
why there are twice relocations on ld.so?
- From: =?GB2312?Q?=C9=F7=BB=D4?= <shenhui at arch dot cs dot pku dot edu dot cn>
- To: "binutils at sources dot redhat dot com" <binutils at sources dot redhat dot com>
- Date: Fri, 12 Apr 2002 9:6:20 +0800
- Subject: 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. */
_dl_relocate_object (&_dl_rtld_map, _dl_loaded->l_scope, 0, 0);
HP_TIMING_DIFF (add, start, stop);
HP_TIMING_ACCUM_NT (relocate_time, add);
i think it need only one time;any hint?