From c5684fdb2badfda3bd6e973e5f933272e39e9590 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 4 Nov 2014 23:26:39 +0000 Subject: Don't use INTDEF/INTUSE with _dl_init (bug 14132). Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this patch eliminates its use for _dl_init. Since _dl_init was already declared with hidden visibility, creating a second hidden alias for it was completely pointless, so this patch replaces all uses of _dl_init_internal with plain _dl_init instead of using hidden_proto / hidden_def (which are only needed when you want a hidden alias for a non-hidden symbol; it's quite possible there are cases where they are used but don't need to be because the symbol in question is not part of the public ABI and is only used within a single library, so using attributes_hidden instead would suffice). Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. [BZ #14132] * elf/dl-init.c (_dl_init): Don't use INTDEF. * sysdeps/aarch64/dl-machine.h (RTLD_START): Use _dl_init instead of _dl_init_internal. * sysdeps/alpha/dl-machine.h (RTLD_START): Likewise. * sysdeps/arm/dl-machine.h (RTLD_START): Likewise. * sysdeps/hppa/dl-machine.h (RTLD_START): Likewise. * sysdeps/i386/dl-machine.h (RTLD_START): Likewise. * sysdeps/ia64/dl-machine.h (RTLD_START): Likewise. * sysdeps/m68k/dl-machine.h (RTLD_START): Likewise. * sysdeps/microblaze/dl-machine.h (RTLD_START): Likewise. * sysdeps/mips/dl-machine.h (RTLD_START): Likewise. * sysdeps/powerpc/powerpc32/dl-start.S (_start): Likewise. * sysdeps/s390/s390-32/dl-machine.h (RTLD_START): Likewise. * sysdeps/s390/s390-64/dl-machine.h (RTLD_START): Likewise. * sysdeps/sh/dl-machine.h (RTLD_START): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise. * sysdeps/tile/dl-start.S (_start): Likewise. * sysdeps/x86_64/dl-machine.h (RTLD_START): Likewise. * sysdeps/x86_64/x32/dl-machine.h (RTLD_START): Likewise. --- sysdeps/mips/dl-machine.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sysdeps/mips') diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index eef0384e4e..5000d2a300 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -295,14 +295,14 @@ do { \ sll $7, $5, " STRINGXP (PTRLOG) "\n\ " STRINGXP(PTR_ADDU) " $7, $7, $6\n\ " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\ - # Make sure the stack pointer is aligned for _dl_init_internal.\n\ + # Make sure the stack pointer is aligned for _dl_init.\n\ and $2, $29, -2 * " STRINGXP(SZREG) "\n\ move $8, $29\n\ " STRINGXP(PTR_SUBIU) " $29, $2, 32\n\ " STRINGXP(PTR_S) " $8, (32 - " STRINGXP(SZREG) ")($29)\n\ " STRINGXP(SAVE_GP(16)) "\n\ # Call the function to run the initializers.\n\ - jal _dl_init_internal\n\ + jal _dl_init\n\ # Restore the stack pointer for _start.\n\ " STRINGXP(PTR_L) " $29, (32 - " STRINGXP(SZREG) ")($29)\n\ # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ @@ -371,7 +371,7 @@ do { \ sll $7, $5, " STRINGXP (PTRLOG) "\n\ addu $7, $6\n\ addu $7, " STRINGXP (PTRSIZE) "\n\ - # Make sure the stack pointer is aligned for _dl_init_internal.\n\ + # Make sure the stack pointer is aligned for _dl_init.\n\ li $2, 2 * " STRINGXP (SZREG) "\n\ neg $2, $2\n\ move $3, $sp\n\ @@ -381,7 +381,7 @@ do { \ move $sp, $2\n\ sw $16, 16($sp)\n\ # Call the function to run the initializers.\n\ - lw $2, %call16(_dl_init_internal)($16)\n\ + lw $2, %call16(_dl_init)($16)\n\ move $25, $2\n\ jalr $2\n\ # Restore the stack pointer for _start.\n\ -- cgit 1.4.1