mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
2002-03-14 Ulrich Drepper <drepper@redhat.com> * elf/dl-minimal.c (malloc): Declare _end as hidden. (__errno_location): New function. Declare errno as hidden. * elf/rtld.c (_dl_argc): Define as hidden. (_dl_skip_args): Define as hidden. (_begin, _end): Declare as hidden. * sysdeps/generic/dl-sysdep.c (_end): Declare as hidden. * sysdeps/generic/entry.h (_start): Declare as hidden. * sysdeps/generic/ldsodefs.h (_dl_argc): Declare as hidden. * sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Declare _dl_runtime_resolve and _dl_runtime_profile as hidden. (RTLD_START): Use GOTOFF to access _dl_skip_args and _dl_fini.
This commit is contained in:
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
2002-03-14 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/dl-minimal.c (malloc): Declare _end as hidden.
|
||||||
|
(__errno_location): New function. Declare errno as hidden.
|
||||||
|
* elf/rtld.c (_dl_argc): Define as hidden.
|
||||||
|
(_dl_skip_args): Define as hidden.
|
||||||
|
(_begin, _end): Declare as hidden.
|
||||||
|
* sysdeps/generic/dl-sysdep.c (_end): Declare as hidden.
|
||||||
|
* sysdeps/generic/entry.h (_start): Declare as hidden.
|
||||||
|
* sysdeps/generic/ldsodefs.h (_dl_argc): Declare as hidden.
|
||||||
|
* sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Declare
|
||||||
|
_dl_runtime_resolve and _dl_runtime_profile as hidden.
|
||||||
|
(RTLD_START): Use GOTOFF to access _dl_skip_args and _dl_fini.
|
||||||
|
|
||||||
2002-03-14 Roland McGrath <roland@frob.com>
|
2002-03-14 Roland McGrath <roland@frob.com>
|
||||||
|
|
||||||
* Makerules ($(common-objpfx)Versions.v.i): Depend on abi-versions.h.
|
* Makerules ($(common-objpfx)Versions.v.i): Depend on abi-versions.h.
|
||||||
|
@ -58,10 +58,12 @@ enum mode { normal, list, verify, trace };
|
|||||||
all the entries. */
|
all the entries. */
|
||||||
static void process_envvars (enum mode *modep);
|
static void process_envvars (enum mode *modep);
|
||||||
|
|
||||||
int _dl_argc;
|
int _dl_argc attribute_hidden;
|
||||||
char **_dl_argv = NULL;
|
char **_dl_argv = NULL;
|
||||||
INTDEF(_dl_argv)
|
INTDEF(_dl_argv)
|
||||||
unsigned int _dl_skip_args; /* Nonzero if we were run directly. */
|
|
||||||
|
/* Nonzero if we were run directly. */
|
||||||
|
unsigned int _dl_skip_args attribute_hidden;
|
||||||
|
|
||||||
/* Set nonzero during loading and initialization of executable and
|
/* Set nonzero during loading and initialization of executable and
|
||||||
libraries, cleared before the executable's entry point runs. This
|
libraries, cleared before the executable's entry point runs. This
|
||||||
@ -216,7 +218,8 @@ _dl_start_final (void *arg, struct link_map *bootstrap_map_p,
|
|||||||
way to do this so we use this trick. gcc never inlines functions
|
way to do this so we use this trick. gcc never inlines functions
|
||||||
which use `alloca'. */
|
which use `alloca'. */
|
||||||
ElfW(Addr) *start_addr = alloca (sizeof (ElfW(Addr)));
|
ElfW(Addr) *start_addr = alloca (sizeof (ElfW(Addr)));
|
||||||
extern char _begin[], _end[];
|
extern char _begin[] attribute_hidden;
|
||||||
|
extern char _end[] attribute_hidden;
|
||||||
#ifdef USE_TLS
|
#ifdef USE_TLS
|
||||||
ElfW(Ehdr) *ehdr;
|
ElfW(Ehdr) *ehdr;
|
||||||
ElfW(Phdr) *phdr;
|
ElfW(Phdr) *phdr;
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include <hp-timing.h>
|
#include <hp-timing.h>
|
||||||
|
|
||||||
extern char **_environ;
|
extern char **_environ;
|
||||||
extern void _end;
|
extern void _end attribute_hidden;
|
||||||
|
|
||||||
/* Protect SUID program against misuse of file descriptors. */
|
/* Protect SUID program against misuse of file descriptors. */
|
||||||
extern void __libc_check_standard_fds (void);
|
extern void __libc_check_standard_fds (void);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
extern void _start (void);
|
extern void _start (void) attribute_hidden;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ENTRY_POINT _start
|
#define ENTRY_POINT _start
|
||||||
|
@ -392,7 +392,7 @@ extern struct rtld_global _rtld_local __rtld_local_attribute__;
|
|||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
|
|
||||||
/* Parameters passed to the dynamic linker. */
|
/* Parameters passed to the dynamic linker. */
|
||||||
extern int _dl_argc;
|
extern int _dl_argc attribute_hidden;
|
||||||
extern char **_dl_argv;
|
extern char **_dl_argv;
|
||||||
#ifdef _RTLD_LOCAL
|
#ifdef _RTLD_LOCAL
|
||||||
extern char **_dl_argv_internal attribute_hidden;
|
extern char **_dl_argv_internal attribute_hidden;
|
||||||
|
@ -79,8 +79,8 @@ static inline int __attribute__ ((unused))
|
|||||||
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
||||||
{
|
{
|
||||||
Elf32_Addr *got;
|
Elf32_Addr *got;
|
||||||
extern void _dl_runtime_resolve (Elf32_Word);
|
extern void _dl_runtime_resolve (Elf32_Word) attribute_hidden;
|
||||||
extern void _dl_runtime_profile (Elf32_Word);
|
extern void _dl_runtime_profile (Elf32_Word) attribute_hidden;
|
||||||
|
|
||||||
if (l->l_info[DT_JMPREL] && lazy)
|
if (l->l_info[DT_JMPREL] && lazy)
|
||||||
{
|
{
|
||||||
@ -223,8 +223,7 @@ _dl_start_user:\n\
|
|||||||
movl %esp, (%eax)\n\
|
movl %esp, (%eax)\n\
|
||||||
# See if we were run as a command with the executable file\n\
|
# See if we were run as a command with the executable file\n\
|
||||||
# name as an extra leading argument.\n\
|
# name as an extra leading argument.\n\
|
||||||
movl _dl_skip_args@GOT(%ebx), %eax\n\
|
movl _dl_skip_args@GOTOFF(%ebx), %eax\n\
|
||||||
movl (%eax), %eax\n\
|
|
||||||
# Pop the original argument count.\n\
|
# Pop the original argument count.\n\
|
||||||
popl %edx\n\
|
popl %edx\n\
|
||||||
# Adjust the stack pointer to skip _dl_skip_args words.\n\
|
# Adjust the stack pointer to skip _dl_skip_args words.\n\
|
||||||
@ -246,7 +245,7 @@ _dl_start_user:\n\
|
|||||||
# Call the function to run the initializers.\n\
|
# Call the function to run the initializers.\n\
|
||||||
call _dl_init_internal@PLT\n\
|
call _dl_init_internal@PLT\n\
|
||||||
# Pass our finalizer function to the user in %edx, as per ELF ABI.\n\
|
# Pass our finalizer function to the user in %edx, as per ELF ABI.\n\
|
||||||
movl _dl_fini@GOT(%ebx), %edx\n\
|
leal _dl_fini@GOTOFF(%ebx), %edx\n\
|
||||||
# Jump to the user's entry point.\n\
|
# Jump to the user's entry point.\n\
|
||||||
jmp *%edi\n\
|
jmp *%edi\n\
|
||||||
.previous\n\
|
.previous\n\
|
||||||
|
Reference in New Issue
Block a user