mirror of git://sourceware.org/git/glibc.git
elf: In _dl_relocate_object, skip processing if object is relocated
This is just a minor optimization. It also makes it more obvious that _dl_relocate_object can be called multiple times. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
2e0c0ff95c
commit
b893410be3
|
@ -205,6 +205,9 @@ void
|
||||||
_dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
_dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||||
int reloc_mode, int consider_profiling)
|
int reloc_mode, int consider_profiling)
|
||||||
{
|
{
|
||||||
|
if (l->l_relocated)
|
||||||
|
return;
|
||||||
|
|
||||||
struct textrels
|
struct textrels
|
||||||
{
|
{
|
||||||
caddr_t start;
|
caddr_t start;
|
||||||
|
@ -242,9 +245,6 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||||
# define consider_symbind 0
|
# define consider_symbind 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (l->l_relocated)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* If DT_BIND_NOW is set relocate all references in this object. We
|
/* If DT_BIND_NOW is set relocate all references in this object. We
|
||||||
do not do this if we are profiling, of course. */
|
do not do this if we are profiling, of course. */
|
||||||
// XXX Correct for auditing?
|
// XXX Correct for auditing?
|
||||||
|
|
Loading…
Reference in New Issue