Skip to content

Commit

Permalink
Relocate objects in dependency order
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab committed Aug 30, 2011
1 parent fbeb5f4 commit 2bc1743
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2011-08-30 Andreas Schwab <schwab@redhat.com>

* elf/rtld.c (dl_main): Relocate objects in dependency order.

2011-08-29 Jiri Olsa <jolsa@redhat.com>

* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi
Expand Down
12 changes: 4 additions & 8 deletions elf/rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -2255,13 +2255,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
/* If we are profiling we also must do lazy reloaction. */
GLRO(dl_lazy) |= consider_profiling;

struct link_map *l = main_map;
while (l->l_next)
l = l->l_next;

HP_TIMING_NOW (start);
do
unsigned i = main_map->l_searchlist.r_nlist;
while (i-- > 0)
{
struct link_map *l = main_map->l_initfini[i];

/* While we are at it, help the memory handling a bit. We have to
mark some data structures as allocated with the fake malloc()
implementation in ld.so. */
Expand All @@ -2280,10 +2279,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
/* Add object to slot information data if necessasy. */
if (l->l_tls_blocksize != 0 && tls_init_tp_called)
_dl_add_to_slotinfo (l);

l = l->l_prev;
}
while (l);
HP_TIMING_NOW (stop);

HP_TIMING_DIFF (relocate_time, start, stop);
Expand Down

0 comments on commit 2bc1743

Please sign in to comment.