Skip to content

Commit

Permalink
Properly set __libc_multiple_libcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab committed Jun 11, 2010
1 parent 26f25ed commit 16552c0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2010-06-11 Andreas Schwab <schwab@redhat.com>

* elf/rtld.c (_dl_starting_up): Always define.
(dl_main): Always set _dl_starting_up.
* elf/dl-support.c (_dl_starting_up): Always define.
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.

2010-06-10 Andreas Schwab <schwab@redhat.com>

* sysdeps/unix/sysv/linux/getpagesize.c: Don't assume AT_PAGESIZE
Expand Down
4 changes: 0 additions & 4 deletions elf/dl-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
/* Type of the initializer. */
typedef void (*init_t) (int, char **, char **);

#ifndef HAVE_INLINED_SYSCALLS
/* Flag, nonzero during startup phase. */
extern int _dl_starting_up;
extern int _dl_starting_up_internal attribute_hidden;
#endif


static void
Expand Down Expand Up @@ -133,9 +131,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
while (i-- > 0)
call_init (main_map->l_initfini[i], argc, argv, env);

#ifndef HAVE_INLINED_SYSCALLS
/* Finished starting up. */
INTUSE(_dl_starting_up) = 0;
#endif
}
INTDEF (_dl_init)
2 changes: 0 additions & 2 deletions elf/dl-support.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ unsigned long long _dl_load_adds;
create a fake scope containing nothing. */
struct r_scope_elem _dl_initial_searchlist;

#ifndef HAVE_INLINED_SYSCALLS
/* Nonzero during startup. */
int _dl_starting_up = 1;
#endif

/* Random data provided by the kernel. */
void *_dl_random;
Expand Down
4 changes: 0 additions & 4 deletions elf/rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ static struct audit_list
struct audit_list *next;
} *audit_list;

#ifndef HAVE_INLINED_SYSCALLS
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
must not be initialized to nonzero, because the unused dynamic
Expand All @@ -116,7 +115,6 @@ static struct audit_list
never be called. */
int _dl_starting_up = 0;
INTVARDEF(_dl_starting_up)
#endif

/* This is the structure which defines all variables global to ld.so
(except those which cannot be added for some reason). */
Expand Down Expand Up @@ -922,10 +920,8 @@ dl_main (const ElfW(Phdr) *phdr,
/* Process the environment variable which control the behaviour. */
process_envvars (&mode);

#ifndef HAVE_INLINED_SYSCALLS
/* Set up a flag which tells we are just starting. */
INTUSE(_dl_starting_up) = 1;
#endif

if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
{
Expand Down

0 comments on commit 16552c0

Please sign in to comment.