mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 17:53:37 +08:00
Remove INTDEF / INTUSE / INTVARDEF (bug 14132).
Completing the removal of the obsolete INTDEF / INTUSE mechanism, this patch removes the final use - that for _dl_starting_up - replacing it by rtld_hidden_def / rtld_hidden_proto. Having removed the last use, the mechanism itself is also removed. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. (This is not much of a test since this variable is only defined and used in the !HAVE_INLINED_SYSCALLS case.) [BZ #14132] * include/libc-symbols.h (INTUSE): Remove macro. (INTDEF): Likewise. (INTVARDEF): Likewise. (_INTVARDEF): Likewise. (INTDEF2): Likewise. (INTVARDEF2): Likewise. * elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use rtld_hidden_def instead of INTVARDEF. * sysdeps/generic/ldsodefs.h [IS_IN_rtld] (_dl_starting_up_internal): Remove declaration. (_dl_starting_up): Use rtld_hidden_proto. * elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove declaration. [!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise. (_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with _dl_starting_up. * elf/dl-writev.h (_dl_writev): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS] (DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of _dl_starting_up_internal.
This commit is contained in:
parent
af83568d3f
commit
9cf27b8d09
24
ChangeLog
24
ChangeLog
@ -1,3 +1,27 @@
|
||||
2014-11-05 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
[BZ #14132]
|
||||
* include/libc-symbols.h (INTUSE): Remove macro.
|
||||
(INTDEF): Likewise.
|
||||
(INTVARDEF): Likewise.
|
||||
(_INTVARDEF): Likewise.
|
||||
(INTDEF2): Likewise.
|
||||
(INTVARDEF2): Likewise.
|
||||
* elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use
|
||||
rtld_hidden_def instead of INTVARDEF.
|
||||
* sysdeps/generic/ldsodefs.h [IS_IN_rtld]
|
||||
(_dl_starting_up_internal): Remove declaration.
|
||||
(_dl_starting_up): Use rtld_hidden_proto.
|
||||
* elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove
|
||||
declaration.
|
||||
[!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise.
|
||||
(_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with
|
||||
_dl_starting_up.
|
||||
* elf/dl-writev.h (_dl_writev): Likewise.
|
||||
* sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS]
|
||||
(DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of
|
||||
_dl_starting_up_internal.
|
||||
|
||||
2014-11-05 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* stdio-common/tst-fmemopen.c (do_test): Refactor to use
|
||||
|
4
NEWS
4
NEWS
@ -9,8 +9,8 @@ Version 2.21
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
6652, 12926, 14138, 14171, 15215, 15884, 17266, 17344, 17363, 17370,
|
||||
17371, 17411, 17460, 17485, 17501, 17508, 17522.
|
||||
6652, 12926, 14132, 14138, 14171, 15215, 15884, 17266, 17344, 17363,
|
||||
17370, 17371, 17411, 17460, 17485, 17501, 17508, 17522.
|
||||
|
||||
Version 2.20
|
||||
|
||||
|
@ -23,12 +23,6 @@
|
||||
/* 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
|
||||
call_init (struct link_map *l, int argc, char **argv, char **env)
|
||||
@ -127,6 +121,6 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
|
||||
|
||||
#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Finished starting up. */
|
||||
INTUSE(_dl_starting_up) = 0;
|
||||
_dl_starting_up = 0;
|
||||
#endif
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ _dl_writev (int fd, const struct iovec *iov, size_t niov)
|
||||
errno when it's being used by another thread that cares about it.
|
||||
Yet we must be sure not to try calling the lock functions before
|
||||
the thread library is fully initialized. */
|
||||
if (__glibc_unlikely (INTUSE (_dl_starting_up)))
|
||||
if (__glibc_unlikely (_dl_starting_up))
|
||||
__writev (fd, iov, niov);
|
||||
else
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ static struct audit_list
|
||||
and will be since that dynamic linker's _dl_start and dl_main will
|
||||
never be called. */
|
||||
int _dl_starting_up = 0;
|
||||
INTVARDEF(_dl_starting_up)
|
||||
rtld_hidden_def (_dl_starting_up)
|
||||
#endif
|
||||
|
||||
/* This is the structure which defines all variables global to ld.so
|
||||
@ -778,7 +778,7 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
|
||||
#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Set up a flag which tells we are just starting. */
|
||||
INTUSE(_dl_starting_up) = 1;
|
||||
_dl_starting_up = 1;
|
||||
#endif
|
||||
|
||||
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
|
||||
|
@ -391,26 +391,6 @@ for linking")
|
||||
|
||||
#define attribute_relro __attribute__ ((section (".data.rel.ro")))
|
||||
|
||||
/* Handling on non-exported internal names. We have to do this only
|
||||
for shared code. */
|
||||
#ifdef SHARED
|
||||
# define INTUSE(name) name##_internal
|
||||
# define INTDEF(name) strong_alias (name, name##_internal)
|
||||
# define INTVARDEF(name) \
|
||||
_INTVARDEF (name, name##_internal)
|
||||
# define _INTVARDEF(name, aliasname) \
|
||||
extern __typeof (name) aliasname __attribute__ ((alias (#name), \
|
||||
visibility ("hidden")));
|
||||
# define INTDEF2(name, newname) strong_alias (name, newname##_internal)
|
||||
# define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
|
||||
#else
|
||||
# define INTUSE(name) name
|
||||
# define INTDEF(name)
|
||||
# define INTVARDEF(name)
|
||||
# define INTDEF2(name, newname)
|
||||
# define INTVARDEF2(name, newname)
|
||||
#endif
|
||||
|
||||
/* The following macros are used for PLT bypassing within libc.so
|
||||
(and if needed other libraries similarly).
|
||||
First of all, you need to have the function prototyped somewhere,
|
||||
|
@ -659,9 +659,7 @@ extern unsigned int _dl_skip_args_internal attribute_hidden
|
||||
/* Flag set at startup and cleared when the last initializer has run. */
|
||||
extern int _dl_starting_up;
|
||||
weak_extern (_dl_starting_up)
|
||||
#ifdef IS_IN_rtld
|
||||
extern int _dl_starting_up_internal attribute_hidden;
|
||||
#endif
|
||||
rtld_hidden_proto (_dl_starting_up)
|
||||
|
||||
/* Random data provided by the kernel. */
|
||||
extern void *_dl_random attribute_hidden attribute_relro;
|
||||
|
@ -126,7 +126,7 @@ elf_machine_dynamic (void)
|
||||
#else
|
||||
# define DL_STARTING_UP_DEF \
|
||||
".LC__dl_starting_up:\n" \
|
||||
" .tc _dl_starting_up_internal[TC],_dl_starting_up_internal\n"
|
||||
" .tc __GI__dl_starting_up[TC],__GI__dl_starting_up\n"
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user