This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] sparc64 crt{begin,end}{,S}


Hi!

There is no reason why glibc should provide these when gcc provides them,
and they don't work correctly (e.g. using the glibc crt* the libpthread
constructor is never called).

2000-04-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/elf/Dist: Remove.
	* sysdeps/sparc/sparc64/elf/crtbegin.S: Remove.
	* sysdeps/sparc/sparc64/elf/crtbeginS.S: Remove.
	* sysdeps/sparc/sparc64/elf/crtend.S: Remove.
	* sysdeps/sparc/sparc64/elf/crtendS.S: Remove.
	* sysdeps/sparc/sparc64/elf/Makefile: Don't build crtbegin/crtend
	objects.

--- libc/sysdeps/sparc/sparc64/elf/Dist.jj	Thu Aug 14 03:45:59 1997
+++ libc/sysdeps/sparc/sparc64/elf/Dist	Tue Apr 25 19:06:19 2000
@@ -1,4 +0,0 @@
-crtbegin.S
-crtbeginS.S
-crtend.S
-crtendS.S
--- libc/sysdeps/sparc/sparc64/elf/crtbeginS.S.jj	Thu Aug 14 03:45:59 1997
+++ libc/sysdeps/sparc/sparc64/elf/crtbeginS.S	Tue Apr 25 19:06:19 2000
@@ -1 +0,0 @@
-#include "crtbegin.S"
--- libc/sysdeps/sparc/sparc64/elf/crtend.S.jj	Wed Sep 16 19:46:13 1998
+++ libc/sysdeps/sparc/sparc64/elf/crtend.S	Tue Apr 25 19:06:19 2000
@@ -1,69 +0,0 @@
-/* Constructor startup code for elf64-sparc
-   Copyright (C) 1997 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
- 
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 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
-   Library General Public License for more details.
- 
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
- 
- 
-.section ".ctors",#alloc,#write
-
-	.align 8
-__CTOR_END__:
-	.xword	0
-
-.section ".dtors",#alloc,#write
-
-	.align 8
-__DTOR_END__:
-	.xword	0
-
-.section ".init",#alloc,#execinstr
-
-	call	__do_global_ctors_aux
-	 nop
-
-.text
-
-	.align 4
-	.type __do_global_ctors_aux,#function
-__do_global_ctors_aux:
-	save	%sp,-192,%sp
-
-#ifdef PIC
-1:	call	11f
-	sethi	%hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
-11:	or	%l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
-	add	%l7, %o7, %l7
-	sethi	%hi(__CTOR_END__), %l0
-	or	%l0, %lo(__CTOR_END__), %l0
-	ldx	[%l7+%l0], %l0
-#else
-	sethi	%hi(__CTOR_END__), %l0
-	or	%l0, %lo(__CTOR_END__), %l0
-#endif
-
-	ba	3f
-	 ldx	[%l0+8], %l1
-2:	jmpl	%l1, %o7
-	 ldx	[%l0+8], %l1
-3:	addcc	%l1, 1, %g0
-	bnz,pt	%xcc, 2b
-	 add	%l0, 8, %l0
-
-	ret
-	 restore
-
-	.size __do_global_ctors_aux,.-__do_global_ctors_aux
--- libc/sysdeps/sparc/sparc64/elf/crtendS.S.jj	Thu Aug 14 03:45:59 1997
+++ libc/sysdeps/sparc/sparc64/elf/crtendS.S	Tue Apr 25 19:06:19 2000
@@ -1 +0,0 @@
-#include "crtend.S"
--- libc/sysdeps/sparc/sparc64/elf/Makefile.jj	Wed Aug 20 05:29:21 1997
+++ libc/sysdeps/sparc/sparc64/elf/Makefile	Wed Aug 20 05:29:20 1997
@@ -1,10 +1,4 @@
+# Sparc/ELF specific definitions.
+
 # The assembler on SPARC needs the -fPIC flag even when it's assembler code.
 ASFLAGS-.os = -fPIC
-
-ifeq ($(subdir), csu)
-extra-objs += crtbegin.o crtend.o crtbeginS.o crtendS.o
-install-lib += crtbegin.o crtend.o crtbeginS.o crtendS.o
-
-CPPFLAGS-crtbeginS.S = -fPIC -DPIC
-CPPFLAGS-crtendS.S = -fPIC -DPIC
-endif
--- libc/sysdeps/sparc/sparc64/elf/crtbegin.S.jj	Wed Sep 16 19:46:12 1998
+++ libc/sysdeps/sparc/sparc64/elf/crtbegin.S	Tue Apr 25 19:06:19 2000
@@ -1,68 +0,0 @@
-/* Destructor cleanup code for elf64-sparc
-   Copyright (C) 1997 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
- 
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 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
-   Library General Public License for more details.
- 
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-
-.section ".ctors",#alloc,#write
-
-	.align 8
-__CTOR_LIST__:
-	.xword	-1
-
-.section ".dtors",#alloc,#write
-
-	.align 8
-__DTOR_LIST__:
-	.xword	-1
-
-.section ".fini",#alloc,#execinstr
-
-	call	__do_global_dtors_aux
-	 nop
-
-.text
-
-	.align 4
-	.type __do_global_dtors_aux,#function
-__do_global_dtors_aux:
-	save	%sp,-192,%sp
-
-#ifdef PIC
-1:	call	11f
-	sethi	%hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
-11:	or	%l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
-	add	%l7, %o7, %l7
-	sethi	%hi(__DTOR_LIST__), %l0
-	or	%l0, %lo(__DTOR_LIST__), %l0
-	ldx	[%l7+%l0], %l0
-#else
-	sethi	%hi(__DTOR_LIST__), %l0
-	or	%l0, %lo(__DTOR_LIST__), %l0
-#endif
-
-	ba	3f
-	 ldx	[%l0+8], %l1
-2:	jmpl	%l1, %o7
-	 ldx	[%l0+8], %l1
-3:	brnz,pt	%l1, 2b
-	 add	%l0, 8, %l0
-
-	ret
-	 restore
-
-	.size __do_global_dtors_aux,.-__do_global_dtors_aux

	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]