Don't initialize %r2 for SDA2_BASE anymore. It's needed for TLS.

This commit is contained in:
matt 2011-03-12 07:56:36 +00:00
parent 69358e3723
commit 01061e574e

View File

@ -1,4 +1,4 @@
/* $NetBSD: crt0.c,v 1.29 2011/03/07 05:09:10 joerg Exp $ */ /* $NetBSD: crt0.c,v 1.30 2011/03/12 07:56:36 matt Exp $ */
/* /*
* Copyright (c) 1997 Jason R. Thorpe. * Copyright (c) 1997 Jason R. Thorpe.
@ -62,7 +62,6 @@ _start(int argc, char **argv, char **envp,
/* /*
* Initialize the Small Data Area registers. * Initialize the Small Data Area registers.
* _SDA_BASE is defined in the SVR4 ABI for PPC. * _SDA_BASE is defined in the SVR4 ABI for PPC.
* _SDA2_BASE is defined in the E[mbedded] ABI for PPC.
* *
* Do the initialization in a PIC manner. * Do the initialization in a PIC manner.
*/ */
@ -71,8 +70,6 @@ _start(int argc, char **argv, char **envp,
"1: mflr 11;" "1: mflr 11;"
"addis 13,11,rtld_SDA_BASE_-1b@ha;" "addis 13,11,rtld_SDA_BASE_-1b@ha;"
"addi 13,13,rtld_SDA_BASE_-1b@l;" "addi 13,13,rtld_SDA_BASE_-1b@l;"
"addis 2,11,rtld_SDA2_BASE_-1b@ha;"
"addi 2,2,rtld_SDA2_BASE_-1b@l"
::: "lr" ); ::: "lr" );
if ((namep = argv[0]) != NULL) { /* NULL ptr if argc = 0 */ if ((namep = argv[0]) != NULL) { /* NULL ptr if argc = 0 */
@ -109,7 +106,7 @@ _start(int argc, char **argv, char **envp,
* NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text. * NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text.
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: crt0.c,v 1.29 2011/03/07 05:09:10 joerg Exp $"); __RCSID("$NetBSD: crt0.c,v 1.30 2011/03/12 07:56:36 matt Exp $");
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include "common.c" #include "common.c"