2014-11-04 Joseph Myers <joseph@codesourcery.com>
+ [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.
+
[BZ #14132]
* sysdeps/generic/ldsodefs.h (_dl_argv): Use rtld_hidden_proto.
[IS_IN_rtld] (_dl_argv_internal): Do not declare.
INTUSE(_dl_starting_up) = 0;
#endif
}
-INTDEF (_dl_init)
adrp x16, _rtld_local \n\
add x16, x16, #:lo12:_rtld_local \n\
ldr x0, [x16] \n\
- bl _dl_init_internal \n\
+ bl _dl_init \n\
// load the finalizer function \n\
adrp x0, _dl_fini \n\
add x0, x0, #:lo12:_dl_fini \n\
lda $18, 8($sp) \n\
s8addq $17, 8, $19 \n\
addq $19, $18, $19 \n\
- bsr $26, _dl_init_internal !samegp \n\
+ bsr $26, _dl_init !samegp \n\
/* Pass our finalizer function to the user in $0. */ \n\
ldah $0, _dl_fini($gp) !gprelhigh \n\
lda $0, _dl_fini($0) !gprellow \n\
ldr r0, .L_LOADED\n\
ldr r0, [sl, r0]\n\
@ call _dl_init\n\
- bl _dl_init_internal(PLT)\n\
+ bl _dl_init(PLT)\n\
@ load the finalizer function\n\
ldr r0, .L_FINI_PROC\n\
add r0, sl, r0\n\
\
/* envp = argv + argc + 1 */ \
" sh2add %r25,%r24,%r23\n" \
-" bl _dl_init_internal,%r2\n" \
+" bl _dl_init,%r2\n" \
" ldo 4(%r23),%r23\n" /* delay slot */ \
\
/* Reload argc, argv to the registers start.S expects. */ \
# Clear %ebp, so that even constructors have terminated backchain.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init_internal@PLT\n\
+ call _dl_init@PLT\n\
# Pass our finalizer function to the user in %edx, as per ELF ABI.\n\
leal _dl_fini@GOTOFF(%ebx), %edx\n\
# Restore %esp _start expects.\n\
" }\n" \
" { .mmb\n" \
" st8 [r2] = r17 /* Load the new _dl_argv. */\n" \
-" br.call.sptk.many b0 = _dl_init_internal#\n" \
+" br.call.sptk.many b0 = _dl_init#\n" \
" ;;\n" \
" }\n" \
" /* Pass our finalizer function to the user,\n" \
pea 8(%sp)\n\
move.l %d1, -(%sp)\n\
" PCREL_OP ("move.l", "_rtld_local", "-(%sp)", "%d0", "%pc") "\n\
- jbsr _dl_init_internal@PLTPC\n\
+ jbsr _dl_init@PLTPC\n\
addq.l #8, %sp\n\
addq.l #8, %sp\n\
| Pass our finalizer function to the user in %a1.\n\
addk r8,r7,r5\n\
addik r8,r8,4\n\
lwi r5,r20,_rtld_local@GOTOFF\n\
- brlid r15,_dl_init_internal\n\
+ brlid r15,_dl_init\n\
nop\n\
lwi r5,r1,24\n\
lwi r3,r1,20\n\
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\
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\
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\
slwi r6,r4,2
add r6,r5,r6
addi r6,r6,4
- bl _dl_init_internal@local
+ bl _dl_init@local
/* Now, to conform to the ELF ABI, we have to: */
/* Pass argc (actually _dl_argc) in r3; */
.Llit:\n\
.Ladr0: .long _GLOBAL_OFFSET_TABLE_-.Llit\n\
.Ladr1: .long _dl_start-.Llit\n\
-.Ladr4: .long _dl_init_internal@PLT-.Llit\n\
+.Ladr4: .long _dl_init@PLT-.Llit\n\
");
#ifndef RTLD_START_SPECIAL_INIT
lgr %r5,%r3\n\
sllg %r5,%r5,3\n\
la %r5,176(%r5,%r15)\n\
- brasl %r14,_dl_init_internal@PLT\n\
+ brasl %r14,_dl_init@PLT\n\
# Pass our finalizer function to the user in %r14, as per ELF ABI.\n\
lghi %r14,_dl_fini@GOT\n\
lg %r14,0(%r14,%r12)\n\
.L_dl_skip_args:\n\
.long _dl_skip_args@GOT\n\
.L_dl_init:\n\
- .long _dl_init_internal@PLT\n\
+ .long _dl_init@PLT\n\
.L_dl_loaded:\n\
.long _rtld_local@GOT\n\
.L_dl_fini:\n\
add %o3, 4, %o3\n\
mov %i5, %o1\n\
add %o2, %o3, %o3\n\
- call _dl_init_internal\n\
+ call _dl_init\n\
ld [%o0], %o0\n\
/* Pass our finalizer function to the user in %g1. */\n\
" RTLD_GOT_ADDRESS(%l7, %g1, _dl_fini) "\n\
" add %o3, 8, %o3\n" \
" mov %i5, %o1\n" \
" add %o2, %o3, %o3\n" \
-" call _dl_init_internal\n" \
+" call _dl_init\n" \
" ldx [%o0], %o0\n" \
" /* Pass our finalizer function to the user in %g1. */\n" \
RTLD_GOT_ADDRESS(%l7, %g1, _dl_fini) \
}
{
SHL_PTR_ADD r3, r3, r2 /* point r3 at envp */
- jal _dl_init_internal
+ jal _dl_init
}
/* Call user program whose address we saved in r50.
movq %rdx, %rsi\n\
# Save %rsp value in %r13.\n\
movq %rsp, %r13\n\
- # And align stack for the _dl_init_internal call. \n\
+ # And align stack for the _dl_init call. \n\
andq $-16, %rsp\n\
# _dl_loaded -> rdi\n\
movq _rtld_local(%rip), %rdi\n\
# Clear %rbp to mark outermost frame obviously even for constructors.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init_internal@PLT\n\
+ call _dl_init@PLT\n\
# Pass our finalizer function to the user in %rdx, as per ELF ABI.\n\
leaq _dl_fini(%rip), %rdx\n\
# And make sure %rsp points to argc stored on the stack.\n\
movl %edx, %esi\n\
# Save %rsp value in %r13.\n\
movl %esp, %r13d\n\
- # And align stack for the _dl_init_internal call.\n\
+ # And align stack for the _dl_init call.\n\
and $-16, %esp\n\
# _dl_loaded -> rdi\n\
movl _rtld_local(%rip), %edi\n\
# Clear %rbp to mark outermost frame obviously even for constructors.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init_internal\n\
+ call _dl_init\n\
# Pass our finalizer function to the user in %rdx, as per ELF ABI.\n\
lea _dl_fini(%rip), %edx\n\
# And make sure %rsp points to argc stored on the stack.\n\