about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/elf/start.S6
-rw-r--r--sysdeps/arm/elf/start.S6
-rw-r--r--sysdeps/cris/elf/start.S10
-rw-r--r--sysdeps/hppa/elf/start.S37
-rw-r--r--sysdeps/i386/elf/start.S6
-rw-r--r--sysdeps/ia64/elf/start.S6
-rw-r--r--sysdeps/m68k/elf/start.S6
-rw-r--r--sysdeps/mach/hurd/powerpc/static-start.S10
-rw-r--r--sysdeps/mips/elf/start.S4
-rw-r--r--sysdeps/powerpc/powerpc32/elf/start.S8
-rw-r--r--sysdeps/powerpc/powerpc64/elf/start.S12
-rw-r--r--sysdeps/s390/s390-32/elf/start.S10
-rw-r--r--sysdeps/s390/s390-64/elf/start.S6
-rw-r--r--sysdeps/sh/elf/start.S6
-rw-r--r--sysdeps/sparc/sparc32/elf/start.S10
-rw-r--r--sysdeps/sparc/sparc64/elf/start.S10
-rw-r--r--sysdeps/x86_64/elf/start.S6
17 files changed, 84 insertions, 75 deletions
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index b0cf119feb..3f98111fd9 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code for Alpha/ELF.
-   Copyright (C) 1993,1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
+   Copyright (C) 1993,1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>
 
@@ -40,8 +40,8 @@ _start:
 	lda	a2, 24(sp)	/* get argv */
 
   /* Load address of our own entry points to .fini and .init.  */
-	lda	a3, _init
-	lda	a4, _fini
+	lda	a3, __libc_csu_init
+	lda	a4, __libc_csu_fini
 
   /* Store address of the shared library termination function.  */
 	mov	v0, a5
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 8d60b3d8d5..90a62f6d9a 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code for ARM & ELF
-   Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -54,12 +54,12 @@ _start:
 
 	/* Push the last arguments to main() onto the stack */
 	stmfd sp!, {a1}
-	ldr a1, =_fini
+	ldr a1, =__libc_csu_fini
 	stmfd sp!, {a1}
 
 	/* Set up the other arguments for main() that go in registers */
 	ldr a1, =main
-	ldr a4, =_init
+	ldr a4, =__libc_csu_init
 
 	/* __libc_start_main (main, argc, argv, init, fini, rtld_fini) */
 
diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S
index e7f1d6750d..dbe408a076 100644
--- a/sysdeps/cris/elf/start.S
+++ b/sysdeps/cris/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code compliant to the ELF CRIS ABI (to-be-written).
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -89,15 +89,15 @@ _start:
 	move.d	pc,r0
 	sub.d	.:GOTOFF,r0
 
-	move.d	_init:PLTG,r13
+	move.d	__libc_csu_init:PLTG,r13
 	add.d	r0,r13
-	move.d	_fini:PLTG,r9
+	move.d	__libc_csu_fini:PLTG,r9
 	add.d	r0,r9
 	move.d	main:PLTG,r10
 	add.d	r0,r10
 #else
-	move.d	_init,r13
-	move.d	_fini,r9
+	move.d	__libc_csu_init,r13
+	move.d	__libc_csu_fini,r9
 	move.d	main,r10
 #endif
 	push	r9
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index b2f0bd2ad1..c7e300c543 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -1,3 +1,21 @@
+/* ELF startup code for HPPA.
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
 
 	.text
 
@@ -6,12 +24,9 @@
 	.import main, code
 	.import $global$, data
 	.import __libc_start_main, code
-	.import _fini, code
-	.import _init, code
+	.import __libc_csu_fini, code
+	.import __libc_csu_init, code
 
-	
-	
-	
 	.globl _start
 	.export _start, ENTRY
 	.type _start,@function
@@ -28,17 +43,17 @@ _start:
 
 	/* Expand the stack to store the 5th through 7th args */
 	ldo	64(%sp), %sp
-	
+
 	/* void (*rtld_fini) (void) (actually the 6th arg) */
 	stw	%r23, -56(%sp)
-	
+
 	/* void (*init) (void) */
-	ldil	LP%_init, %r23
-	ldo	RP%_init(%r23), %r23
+	ldil	LP%__libc_csu_init, %r23
+	ldo	RP%__libc_csu_init(%r23), %r23
 
 	/* void (*fini) (void) */
-	ldil	LP%_fini, %r22
-	ldo	RP%_fini(%r22), %r22
+	ldil	LP%__libc_csu_fini, %r22
+	ldo	RP%__libc_csu_fini(%r22), %r22
 	stw	%r22, -52(%sp)
 
 	/* void *stack_end */
diff --git a/sysdeps/i386/elf/start.S b/sysdeps/i386/elf/start.S
index 2fe16c599a..355cba21a1 100644
--- a/sysdeps/i386/elf/start.S
+++ b/sysdeps/i386/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code compliant to the ELF i386 ABI.
-   Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
+   Copyright (C) 1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -68,8 +68,8 @@ _start:
 				   termination function.  */
 
 	/* Push address of our own entry points to .fini and .init.  */
-	pushl $_fini
-	pushl $_init
+	pushl $__libc_csu_fini
+	pushl $__libc_csu_init
 
 	pushl %ecx		/* Push second argument: argv.  */
 	pushl %esi		/* Push first argument: argc.  */
diff --git a/sysdeps/ia64/elf/start.S b/sysdeps/ia64/elf/start.S
index d787c0bf5d..a05ddfbb52 100644
--- a/sysdeps/ia64/elf/start.S
+++ b/sysdeps/ia64/elf/start.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
 
@@ -64,13 +64,13 @@ _start:
 	{
 	  addl r11 = @ltoff(__libc_ia64_register_backing_store_base), gp
 	  addl out0 = @ltoff(@fptr(main)), gp
-	  addl out3 = @ltoff(@fptr(_init)), gp
+	  addl out3 = @ltoff(@fptr(__libc_csu_init)), gp
 	  ;;
 	}
 	{ .mmi
 	  ld8 r3 = [r11]	/* pointer to __libc_ia64_register_backing_store_base */
 	  ld8 out0 = [out0]	/* pointer to `main' function descriptor */
-	  addl out4 = @ltoff(@fptr(_fini)), gp
+	  addl out4 = @ltoff(@fptr(__libc_csu_fini)), gp
 	  ;;
 	}
 	{ .mmi
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index eda735583d..f65cda75cd 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code compliant to the ELF m68k ABI.
-   Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -60,8 +60,8 @@ _start:
 
 	/* Push the address of our own entry points to `.fini' and
 	   `.init'.  */
-	pea _fini
-	pea _init
+	pea __libc_csu_fini
+	pea __libc_csu_init
 
 	pea (%a0)		/* Push second argument: argv.  */
 	move.l %d0, -(%sp)	/* Push first argument: argc.  */
diff --git a/sysdeps/mach/hurd/powerpc/static-start.S b/sysdeps/mach/hurd/powerpc/static-start.S
index 209972c426..3420fcd31d 100644
--- a/sysdeps/mach/hurd/powerpc/static-start.S
+++ b/sysdeps/mach/hurd/powerpc/static-start.S
@@ -1,5 +1,5 @@
 /* Startup code for statically linked Hurd/PowerPC binaries.
-   Copyright (C) 1998,2001 Free Software Foundation, Inc.
+   Copyright (C) 1998,2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,13 +22,13 @@
  /* These are the various addresses we require.  */
 	.section ".rodata"
 	.align	2
-	weak_extern(_init)
-	weak_extern(_fini)
+	weak_extern(__libc_csu_init)
+	weak_extern(__libc_csu_fini)
 L(start_addresses):
 	.long	_SDA_BASE_
 	.long	JUMPTARGET(main)
-	.long	JUMPTARGET(_init)
-	.long	JUMPTARGET(_fini)
+	.long	JUMPTARGET(__libc_csu_init)
+	.long	JUMPTARGET(__libc_csu_fini)
 	ASM_SIZE_DIRECTIVE(L(start_addresses))
 
 	.section ".text"
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 01908e28db..e85e9f535e 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -83,8 +83,8 @@ ENTRY_POINT:
 	   the stack is aligned to double words (8 bytes).  */
 	and $29, 0xfffffff8
 	subu $29, 32
-	la $7, _init		/* init */
-	la $8, _fini
+	la $7, __libc_csu_init		/* init */
+	la $8, __libc_csu_fini
 	sw $8, 16($29)		/* fini */
 	sw $2, 20($29)		/* rtld_fini */
 	sw $29, 24($29)		/* stack_end */
diff --git a/sysdeps/powerpc/powerpc32/elf/start.S b/sysdeps/powerpc/powerpc32/elf/start.S
index 063df75328..04e3d358f1 100644
--- a/sysdeps/powerpc/powerpc32/elf/start.S
+++ b/sysdeps/powerpc/powerpc32/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code for programs linked with GNU libc.
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +23,11 @@
  /* These are the various addresses we require.  */
 	.section ".rodata"
 	.align	2
-	weak_extern(_init)
-	weak_extern(_fini)
 L(start_addresses):
 	.long	_SDA_BASE_
 	.long	JUMPTARGET(BP_SYM (main))
-	.long 	JUMPTARGET(_init)
-	.long 	JUMPTARGET(_fini)
+	.long 	JUMPTARGET(__libc_csu_init)
+	.long 	JUMPTARGET(__libc_csu_fini)
 	ASM_SIZE_DIRECTIVE(L(start_addresses))
 
 	.section ".text"
diff --git a/sysdeps/powerpc/powerpc64/elf/start.S b/sysdeps/powerpc/powerpc64/elf/start.S
index 129f126e9d..65fa52c0f5 100644
--- a/sysdeps/powerpc/powerpc64/elf/start.S
+++ b/sysdeps/powerpc/powerpc64/elf/start.S
@@ -23,16 +23,12 @@
  /* These are the various addresses we require.  */
 	.section ".rodata"
 	.align	3
-	weak_extern(_init)
-	weak_extern(_fini) 
-	weak_extern(._init)
-	weak_extern(._fini) 
 L(start_addresses):
 	.quad	0 /* was _SDA_BASE_  but not in 64-bit ABI*/
 /*     function descriptors so don't need JUMPTARGET */
-	.quad	BP_SYM(main) 
-	.quad 	_init
-	.quad 	_fini 
+	.quad	BP_SYM(main)
+	.quad 	__libc_csu_init
+	.quad 	__libc_csu_fini
 
 	ASM_SIZE_DIRECTIVE(L(start_addresses))
 
@@ -55,7 +51,7 @@ ENTRY(_start)
 	ld	r8,.L01(r2)
 
  /* and continue in libc-start, in glibc.  */
-	b	JUMPTARGET(BP_SYM(__libc_start_main)) 
+	b	JUMPTARGET(BP_SYM(__libc_start_main))
 
 END(_start)
 
diff --git a/sysdeps/s390/s390-32/elf/start.S b/sysdeps/s390/s390-32/elf/start.S
index 0a17543352..1a0436b9a5 100644
--- a/sysdeps/s390/s390-32/elf/start.S
+++ b/sysdeps/s390/s390-32/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code compliant to the ELF s390 ABI.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -63,8 +63,8 @@ _start:
 	 */
 	stm     %r14,%r15,96(%r15)      # store rtld_fini/stack_end to parameter area
 	la      %r7,96(%r15)
-	l       %r6,.L2-.Llit(%r13)     # load pointer to _fini
-	l       %r5,.L1-.Llit(%r13)     # load pointer to _init
+	l       %r6,.L2-.Llit(%r13)     # load pointer to __libc_csu_fini
+	l       %r5,.L1-.Llit(%r13)     # load pointer to __libc_csu_init
 	l       %r2,.L3-.Llit(%r13)     # load pointer to main
 
 	/* ok, now branch to the libc main routine */
@@ -75,8 +75,8 @@ _start:
 	.word   0
 
 .Llit:
-.L1:    .long  _init
-.L2:    .long  _fini
+.L1:    .long  __libc_csu_init
+.L2:    .long  __libc_csu_fini
 .L3:    .long  main
 .L4:    .long  __libc_start_main
 
diff --git a/sysdeps/s390/s390-64/elf/start.S b/sysdeps/s390/s390-64/elf/start.S
index bbc28089f9..687a23cc67 100644
--- a/sysdeps/s390/s390-64/elf/start.S
+++ b/sysdeps/s390/s390-64/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code compliant to the 64 bit S/390 ELF ABI.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -59,8 +59,8 @@ _start:
 	 */
 	stmg	%r14,%r15,160(%r15)	# store rtld_fini/stack_end to parameter area
 	la	%r7,160(%r15)
-	larl	%r6,_fini		# load pointer to _fini
-	larl	%r5,_init		# load pointer to _init
+	larl	%r6,__libc_csu_fini	# load pointer to __libc_csu_fini
+	larl	%r5,__libc_csu_init	# load pointer to __libc_csu_init
 	larl	%r2,main		# load pointer to main
 
 	/* Ok, now branch to the libc main routine.  */
diff --git a/sysdeps/sh/elf/start.S b/sysdeps/sh/elf/start.S
index 5bcb08f236..98eded3886 100644
--- a/sysdeps/sh/elf/start.S
+++ b/sysdeps/sh/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code for SH & ELF.
-   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -75,9 +75,9 @@ _start:
 L_main:
 	.long	main
 L_init:
-	.long	_init
+	.long	__libc_csu_init
 L_fini:
-	.long	_fini
+	.long	__libc_csu_fini
 L_libc_start_main:
 	.long	__libc_start_main
 L_abort:
diff --git a/sysdeps/sparc/sparc32/elf/start.S b/sysdeps/sparc/sparc32/elf/start.S
index 5fd0613463..ca6558ec17 100644
--- a/sysdeps/sparc/sparc32/elf/start.S
+++ b/sysdeps/sparc/sparc32/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code for elf32-sparc
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
 
@@ -39,11 +39,11 @@ _start:
 
   /* Load the addresses of the user entry points.  */
 	sethi	%hi(main), %o0
-	sethi	%hi(_init), %o3
-	sethi	%hi(_fini), %o4
+	sethi	%hi(__libc_csu_init), %o3
+	sethi	%hi(__libc_csu_fini), %o4
 	or	%o0, %lo(main), %o0
-	or	%o3, %lo(_init), %o3
-	or	%o4, %lo(_fini), %o4
+	or	%o3, %lo(__libc_csu_init), %o3
+	or	%o4, %lo(__libc_csu_fini), %o4
 
   /* When starting a binary via the dynamic linker, %g1 contains the
      address of the shared library termination function, which will be
diff --git a/sysdeps/sparc/sparc64/elf/start.S b/sysdeps/sparc/sparc64/elf/start.S
index 472dec5ab3..ea7431aae1 100644
--- a/sysdeps/sparc/sparc64/elf/start.S
+++ b/sysdeps/sparc/sparc64/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code for elf64-sparc
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
 
@@ -40,11 +40,11 @@ _start:
 
   /* Load the addresses of the user entry points.  */
         sethi   %hi(main), %o0
-        sethi   %hi(_init), %o3
-        sethi   %hi(_fini), %o4
+        sethi   %hi(__libc_csu_init), %o3
+        sethi   %hi(__libc_csu_fini), %o4
         or      %o0, %lo(main), %o0
-        or      %o3, %lo(_init), %o3
-        or      %o4, %lo(_fini), %o4
+        or      %o3, %lo(__libc_csu_init), %o3
+        or      %o4, %lo(__libc_csu_fini), %o4
 
   /* When starting a binary via the dynamic linker, %g1 contains the
      address of the shared library termination function, which will be
diff --git a/sysdeps/x86_64/elf/start.S b/sysdeps/x86_64/elf/start.S
index 600aaf2566..6e3fb265af 100644
--- a/sysdeps/x86_64/elf/start.S
+++ b/sysdeps/x86_64/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code compliant to the ELF x86-64 ABI.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 2001.
 
@@ -75,8 +75,8 @@ _start:
 	pushq %rsp
 
 	/* Pass address of our own entry points to .fini and .init.  */
-	movq $_fini, %r8
-	movq $_init, %rcx
+	movq $__libc_csu_fini, %r8
+	movq $__libc_csu_init, %rcx
 
 	movq $BP_SYM (main), %rdi