mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
* elf/rtld.c: Declare _environ as hidden. * sysdeps/generic/dl-environ.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/ldsodefs.h: Declare _dl_debug_state_internal and _dl_mcount_internal as hidden. * elf/Makefile (rtld-routines): Add dl-sbrk and dl-brk. * sysdeps/generic/dl-brk.c: New file. * sysdeps/generic/dl-sbrk.c: New file. * sysdeps/unix/sysv/linux/i386/dl-brk.c: New file. * sysdeps/unix/sysv/linux/i386/dl-sbrk.c: New file.
This commit is contained in:
13
ChangeLog
13
ChangeLog
@@ -1,5 +1,18 @@
|
|||||||
2002-03-14 Ulrich Drepper <drepper@redhat.com>
|
2002-03-14 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/rtld.c: Declare _environ as hidden.
|
||||||
|
* sysdeps/generic/dl-environ.c: Likewise.
|
||||||
|
* sysdeps/generic/dl-sysdep.c: Likewise.
|
||||||
|
|
||||||
|
* sysdeps/generic/ldsodefs.h: Declare _dl_debug_state_internal and
|
||||||
|
_dl_mcount_internal as hidden.
|
||||||
|
|
||||||
|
* elf/Makefile (rtld-routines): Add dl-sbrk and dl-brk.
|
||||||
|
* sysdeps/generic/dl-brk.c: New file.
|
||||||
|
* sysdeps/generic/dl-sbrk.c: New file.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/dl-brk.c: New file.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/dl-sbrk.c: New file.
|
||||||
|
|
||||||
* elf/dl-minimal.c (malloc): Declare _end as hidden.
|
* elf/dl-minimal.c (malloc): Declare _end as hidden.
|
||||||
(__errno_location): New function. Declare errno as hidden.
|
(__errno_location): New function. Declare errno as hidden.
|
||||||
* elf/rtld.c (_dl_argc): Define as hidden.
|
* elf/rtld.c (_dl_argc): Define as hidden.
|
||||||
|
@@ -38,7 +38,7 @@ elide-routines.os = $(all-dl-routines) dl-support enbl-secure \
|
|||||||
# ld.so uses those routines, plus some special stuff for being the program
|
# ld.so uses those routines, plus some special stuff for being the program
|
||||||
# interpreter and operating independent of libc.
|
# interpreter and operating independent of libc.
|
||||||
rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal \
|
rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal \
|
||||||
dl-xstat64 dl-fxstat64
|
dl-xstat64 dl-fxstat64 dl-sbrk dl-brk
|
||||||
all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
|
all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
|
||||||
|
|
||||||
distribute := $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
|
distribute := $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
|
||||||
|
@@ -1579,7 +1579,7 @@ a filename can be specified using the LD_DEBUG_OUTPUT environment variable.\n");
|
|||||||
/* Process all environments variables the dynamic linker must recognize.
|
/* Process all environments variables the dynamic linker must recognize.
|
||||||
Since all of them start with `LD_' we are a bit smarter while finding
|
Since all of them start with `LD_' we are a bit smarter while finding
|
||||||
all the entries. */
|
all the entries. */
|
||||||
extern char **_environ;
|
extern char **_environ attribute_hidden;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
2
sysdeps/generic/dl-brk.c
Normal file
2
sysdeps/generic/dl-brk.c
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/* Just use the normal code. */
|
||||||
|
#include <brk.c>
|
@@ -50,6 +50,10 @@ _dl_next_ld_env_entry (char ***position)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* In ld.so __environ is not exported. */
|
||||||
|
extern char **__environ attribute_hidden;
|
||||||
|
|
||||||
int
|
int
|
||||||
unsetenv (const char *name)
|
unsetenv (const char *name)
|
||||||
{
|
{
|
||||||
|
2
sysdeps/generic/dl-sbrk.c
Normal file
2
sysdeps/generic/dl-sbrk.c
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/* Just use the normal code. */
|
||||||
|
#include <sbrk.c>
|
@@ -38,7 +38,7 @@
|
|||||||
#include <dl-osinfo.h>
|
#include <dl-osinfo.h>
|
||||||
#include <hp-timing.h>
|
#include <hp-timing.h>
|
||||||
|
|
||||||
extern char **_environ;
|
extern char **_environ attribute_hidden;
|
||||||
extern void _end attribute_hidden;
|
extern void _end attribute_hidden;
|
||||||
|
|
||||||
/* Protect SUID program against misuse of file descriptors. */
|
/* Protect SUID program against misuse of file descriptors. */
|
||||||
|
@@ -634,7 +634,7 @@ extern void _dl_fini (void) internal_function;
|
|||||||
says what change is taking place. This function's address is
|
says what change is taking place. This function's address is
|
||||||
the value of the `r_brk' member. */
|
the value of the `r_brk' member. */
|
||||||
extern void _dl_debug_state (void);
|
extern void _dl_debug_state (void);
|
||||||
extern void _dl_debug_state_internal (void);
|
extern void _dl_debug_state_internal (void) attribute_hidden;
|
||||||
|
|
||||||
/* Initialize `struct r_debug' if it has not already been done. The
|
/* Initialize `struct r_debug' if it has not already been done. The
|
||||||
argument is the run-time load address of the dynamic linker, to be put
|
argument is the run-time load address of the dynamic linker, to be put
|
||||||
@@ -655,7 +655,8 @@ extern void _dl_start_profile_internal (struct link_map *map,
|
|||||||
|
|
||||||
/* The actual functions used to keep book on the calls. */
|
/* The actual functions used to keep book on the calls. */
|
||||||
extern void _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc);
|
extern void _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc);
|
||||||
extern void _dl_mcount_internal (ElfW(Addr) frompc, ElfW(Addr) selfpc);
|
extern void _dl_mcount_internal (ElfW(Addr) frompc, ElfW(Addr) selfpc)
|
||||||
|
attribute_hidden;
|
||||||
|
|
||||||
/* This function is simply a wrapper around the _dl_mcount function
|
/* This function is simply a wrapper around the _dl_mcount function
|
||||||
which does not require a FROMPC parameter since this is the
|
which does not require a FROMPC parameter since this is the
|
||||||
|
5
sysdeps/unix/sysv/linux/i386/dl-brk.c
Normal file
5
sysdeps/unix/sysv/linux/i386/dl-brk.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/* We can use the normal code but we also know the __curbrk is not exported
|
||||||
|
from ld.so. */
|
||||||
|
extern void *__curbrk attribute_hidden;
|
||||||
|
|
||||||
|
#include <brk.c>
|
5
sysdeps/unix/sysv/linux/i386/dl-sbrk.c
Normal file
5
sysdeps/unix/sysv/linux/i386/dl-sbrk.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/* We can use the normal code but we also know the __curbrk is not exported
|
||||||
|
from ld.so. */
|
||||||
|
extern void *__curbrk attribute_hidden;
|
||||||
|
|
||||||
|
#include <sbrk.c>
|
Reference in New Issue
Block a user