this struct, remove all exports for the signal variables.
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
{
*(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
}
" RTLD_START_SPECIAL_INIT " \n\
/* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\
initializers. */ \n\
- ldq $16, _dl_loaded \n\
+ ldq $16, _rtld_global \n\
ldq $17, 0($sp) \n\
lda $18, 8($sp) \n\
s8addq $17, 8, $19 \n\
{
unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
-#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
+#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
{
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
/* Already done in dynamic linker. */
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
# endif
{
/* XXX Make some timings. Maybe it's preverable to test for
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
/* Say that we really want profiling and the timers are
started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
else
/* This function will get called to fix up the GOT entry indicated by
.L_STACK_END:
.word __libc_stack_end(GOT)
.L_LOADED:
- .word _dl_loaded(GOT)
+ .word _rtld_global(GOT)
.previous\n\
");
_dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init ()
-extern const char *_dl_platform;
-
static inline void __attribute__ ((unused))
dl_platform_init (void)
{
- if (_dl_platform != NULL && *_dl_platform == '\0')
+ if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
/* Avoid an empty string which would disturb us. */
- _dl_platform = NULL;
+ GL(dl_platform) = NULL;
}
static inline Elf32_Addr
found. */
break;
if (sym->st_size > refsym->st_size
- || (_dl_verbose && sym->st_size < refsym->st_size))
+ || (GL(dl_verbose) && sym->st_size < refsym->st_size))
{
const char *strtab;
compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because
rtld.c contains the common defn for _dl_rtld_map, which
is incompatible with a weak decl in the same file. */
+# ifndef SHARED
weak_extern (_dl_rtld_map);
+# endif
if (map == &_dl_rtld_map)
/* Undo the relocation done here during bootstrapping.
Now we will relocate it anew, possibly using a
/* Machine-dependent ELF dynamic relocation inline functions. CRIS version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
}
else
move.d $sp,$r12
addq 4,$r12
; main_map: at _dl_loaded.
- move.d [$r0+_dl_loaded:GOT16],$r9
+ move.d [$r0+_rtld_global:GOT16],$r9
move.d [$r9],$r10
move.d _dl_init:PLTG,$r9
add.d $r0,$r9
_dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init ()
-extern const char *_dl_platform;
-
static inline void __attribute__ ((unused))
dl_platform_init (void)
{
- if (_dl_platform != NULL && *_dl_platform == '\0')
+ if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
/* Avoid an empty string which would disturb us. */
- _dl_platform = NULL;
+ GL(dl_platform) = NULL;
}
static inline Elf32_Addr
found. */
break;
if (sym->st_size > refsym->st_size
- || (_dl_verbose && sym->st_size < refsym->st_size))
+ || (GL(dl_verbose) && sym->st_size < refsym->st_size))
{
extern char **_dl_argv;
const char *strtab;
/* Make dynamic PLABELs for function pointers. HPPA version.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#ifdef MAP_ANON
/* The fd is not examined when using MAP_ANON. */
-#define ANONFD -1
+# define ANONFD -1
#else
-extern int _dl_zerofd;
-#define ANONFD _dl_zerofd
+# define ANONFD GL(dl_zerofd)
#endif
struct hppa_fptr __boot_ldso_fptr[HPPA_BOOT_FPTR_SIZE];
{
#ifndef MAP_ANON
# define MAP_ANON 0
- if (_dl_zerofd == -1)
+ if (GL(dl_zerofd) == -1)
{
- _dl_zerofd = _dl_sysdep_open_zero_fill ();
- if (_dl_zerofd == -1)
+ GL(dl_zerofd) = _dl_sysdep_open_zero_fill ();
+ if (GL(dl_zerofd) == -1)
{
__close (fd);
_dl_signal_error (errno, NULL, NULL,
}
#endif
- __fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE,
+ __fptr_next = __mmap (0, GL(dl_pagesize), PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, ANONFD, 0);
if (__fptr_next == MAP_FAILED)
_dl_signal_error(errno, NULL, NULL, "cannot map page for fptr");
- __fptr_count = _dl_pagesize / sizeof (struct hppa_fptr);
+ __fptr_count = GL(dl_pagesize) / sizeof (struct hppa_fptr);
}
f = __fptr_next++;
__fptr_count--;
/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
- Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc.
Contributed by David Huggins-Daines <dhd@debian.org>
This file is part of the GNU C Library.
((unsigned long) &_dl_runtime_resolve & ~3))->func;
else
{
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that
we really want profiling and the timers are
started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
got[-2] =
(Elf32_Addr) ((struct hppa_fptr *)
" stw %r24,-44(%sp)\n" \
\
".Lnofix:\n" \
-" addil LT'_dl_loaded,%r19\n" \
-" ldw RT'_dl_loaded(%r1),%r26\n" \
+" addil LT'_rtld_global,%r19\n" \
+" ldw RT'_rtld_global(%r1),%r26\n" \
" bl set_dp, %r2\n" \
" ldw 0(%r26),%r26\n" \
\
struct link_map *sym_map;
Elf32_Addr value;
-#ifndef RTLD_BOOTSTRAP
+#if !defined RTLD_BOOTSTRAP && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
because rtld.c contains the common defn for _dl_rtld_map, which is
incompatible with a weak decl in the same file. */
- weak_extern (_dl_rtld_map);
+ weak_extern (GL(dl_rtld_map));
#endif
/* RESOLVE_MAP will return a null value for undefined syms, and
other ones will have their values reset. In particular,
__fptr_next will be reset, sometimes causing endless loops in
__hppa_make_fptr(). So don't do that. */
- if (map == &_dl_rtld_map)
+ if (map == &GL(dl_rtld_map))
return;
#endif
/* .eh_frame can have unaligned relocs. */
break;
if (__builtin_expect (sym->st_size > refsym->st_size, 0)
|| (__builtin_expect (sym->st_size < refsym->st_size, 0)
- && __builtin_expect (_dl_verbose, 0)))
+ && __builtin_expect (GL(dl_verbose), 0)))
{
const char *strtab;
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
}
else
pea 8(%sp, %d1*4)
pea 8(%sp)
move.l %d1, -(%sp)
- move.l ([_dl_loaded@GOT.w, %a5]), -(%sp)
+ move.l ([_rtld_global@GOT.w, %a5]), -(%sp)
jbsr _dl_init@PLTPC
addq.l #8, %sp
addq.l #8, %sp
found. */
break;
if (sym->st_size > refsym->st_size
- || (sym->st_size < refsym->st_size && _dl_verbose))
+ || (sym->st_size < refsym->st_size && GL(dl_verbose)))
{
extern char **_dl_argv;
const char *strtab;
}
{
- struct link_map *l = _dl_loaded;
+ struct link_map *l = GL(dl_loaded);
while (l)
{
# Save back the modified argument count.\n\
sw $4, 0($29)\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _dl_loaded\n\
+ lw $4, _rtld_global\n\
lw $5, 0($29)\n\
la $6, 4($29)\n\
sll $7, $5, 2\n\
{
const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
-#ifndef RTLD_BOOTSTRAP
+#if !defined RTLD_BOOTSTRAP && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a;
make the reference weak so static programs can still link. This
declaration cannot be done when compiling rtld.c (i.e. #ifdef
RTLD_BOOTSTRAP) because rtld.c contains the common defn for
_dl_rtld_map, which is incompatible with a weak decl in the same
file. */
- weak_extern (_dl_rtld_map);
+ weak_extern (GL(dl_rtld_map));
#endif
switch (r_type)
if (symidx < gotsym)
{
#ifndef RTLD_BOOTSTRAP
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
#endif
*reloc_addr += sym->st_value + map->l_addr;
}
}
else
#ifndef RTLD_BOOTSTRAP
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
#endif
*reloc_addr += map->l_addr;
}
({ \
const ElfW(Sym) *ref = sym; \
const struct r_found_version *version \
- = vernum ? &map->l_versions [vernum [sym_index]] : NULL; \
+ = vernum ? &map->l_versions[vernum[sym_index]] : NULL; \
ElfW(Addr) value; \
value = RESOLVE (&ref, version, R_MIPS_REL32); \
(ref)? value + ref->st_value: 0; \
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
/* The dynamic linker's local got entries have already been relocated. */
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
{
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
/* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version.
- Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
}
{
- struct link_map *l = _dl_loaded;
+ struct link_map *l = GL(dl_loaded);
while (l)
{
# Save back the modified argument count.\n\
sd $4, 0($29)\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- ld $4, _dl_loaded\n\
+ ld $4, _rtld_global\n\
ld $5, 0($29)\n\
dla $6, 4($29)\n\
dla $7, 8($29)\n\
dla $31, _dl_fini\n\
# Jump to the user entry point.\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _dl_loaded\n\
+ lw $4, _rtld_global\n\
lw $5, 0($29)\n\
la $6, 4($29)\n\
la $7, 8($29)\n\
RTLD_BOOTSTRAP) because rtld.c contains the common defn for
_dl_rtld_map, which is incompatible with a weak decl in the same
file. */
- weak_extern (_dl_rtld_map);
- if (map == &_dl_rtld_map)
+# ifndef SHARED
+ weak_extern (GL(dl_rtld_map));
+# endif
+ if (map == &GL(dl_rtld_map))
/* Undo the relocation done here during bootstrapping. Now we will
relocate it anew, possibly using a binding found in the user
program or a loaded library rather than the dynamic linker's
/* Initialization code run first thing by the XCOFF startup code. AIX version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Needed by setenv */
char **__environ;
-/* Needed by dl-support.c */
-/* XXX stubbing out dl-support.c for now..
- size_t _dl_pagesize = 0; */
-
/*
* Find __rtinit symbol
*
/* Call the initializer of the program, if any. */
#ifdef SHARED
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
_dl_debug_printf ("\ninitialize program: %s\n\n",
__libc_start_data.argv[0]);
#endif
(*__libc_start_data.init) ();
#ifdef SHARED
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
_dl_debug_printf ("\ntransferring control: %s\n\n",
__libc_start_data.argv[0]);
#endif
/* Initialization code run first thing by the XCOFF startup code. AIX version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Needed by setenv */
char **__environ;
-/* Needed by dl-support.c */
-/* XXX stubbing out dl-support.c for now..
- size_t _dl_pagesize = 0; */
-
/*
Find __rtinit symbol
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@suse.de>.
#include <sys/param.h>
#include <errno.h>
+#include <ldsodefs.h>
#include <sysdep.h>
#include <sys/syscall.h>
int
__getpagesize ()
{
- extern size_t _dl_pagesize;
#ifdef __NR_getpagesize
int result;
#endif
- if (_dl_pagesize != 0)
- return _dl_pagesize;
+ if (GL(dl_pagesize) != 0)
+ return GL(dl_pagesize);
#ifdef __NR_getpagesize
result = INLINE_SYSCALL (getpagesize, 0);