Use _ENTRY

This commit is contained in:
matt 2014-02-27 18:11:08 +00:00
parent f95f4dd350
commit 22332fd4bf
1 changed files with 8 additions and 34 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: crti.S,v 1.2 2014/02/27 16:47:48 matt Exp $ */
/* $NetBSD: crti.S,v 1.3 2014/02/27 18:11:08 matt Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -31,53 +31,27 @@
#include <powerpc/asm.h>
RCSID("$NetBSD: crti.S,v 1.2 2014/02/27 16:47:48 matt Exp $")
RCSID("$NetBSD: crti.S,v 1.3 2014/02/27 18:11:08 matt Exp $")
#include "sysident.S"
.globl _init
.type _init,@function
.section ".init", "ax", @progbits
.align P2SZREG
#ifdef _LP64
.globl ._init
.pushsection ".opd", "aw"
.align 3
_init: .quad ._init,.TOC.@tocbase,0
.size _init, (3*SZREG)
.popsection
._init:
#else
_init:
#endif
_ENTRY(_init)
mflr %r0
#ifdef _LP64
stlongu %r1, -(6*SZREG)(%r1)
stlong %r0, (2*SZREG)(%r1)
stdu %r1, -(6*SZREG)(%r1)
std %r0, (2*SZREG)(%r1)
#else
stw %r0, (1*SZREG)(%r1)
stwu %r1, -(4*SZREG)(%r1)
#endif
.globl _fini
.type _fini,@function
.section ".fini", "ax", @progbits
.align P2SZREG
#ifdef _LP64
.globl ._fini
.pushsection ".opd", "aw"
.align 3
_fini: .quad ._fini,.TOC.@tocbase,0
.size _fini, (3*SZREG)
.popsection
._fini:
#else
_fini:
#endif
_ENTRY(_fini)
mflr %r0
#ifdef _LP64
stlongu %r1, -(6*SZREG)(%r1)
stlong %r0, (2*SZREG)(%r1)
stdu %r1, -(6*SZREG)(%r1)
std %r0, (2*SZREG)(%r1)
#else
stw %r0, (1*SZREG)(%r1)
stwu %r1, -(4*SZREG)(%r1)