source: trunk/libs/newlib/src/libgloss/cris/crtn.c @ 458

Last change on this file since 458 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.8 KB
Line 
1/* Executable and DSO init/fini end for cris*-axis-linux-gnu and simulators
2   Copyright (C) 2000, 2001, 2004, 2005, 2007 Axis Communications.
3   All rights reserved.
4
5   Redistribution and use in source and binary forms, with or without
6   modification, are permitted provided that the following conditions
7   are met:
8
9   1. Redistributions of source code must retain the above copyright
10      notice, this list of conditions and the following disclaimer.
11
12   2. Neither the name of Axis Communications nor the names of its
13      contributors may be used to endorse or promote products derived
14      from this software without specific prior written permission.
15
16   THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS
17   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS
20   COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26   IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27   POSSIBILITY OF SUCH DAMAGE.  */
28
29#ifdef __ELF__
30
31__asm__ (".syntax no_register_prefix");
32
33__asm__ (".section .init\n"
34#ifdef __PIC__
35         "\tmove.d [sp+],r0\n"
36#endif
37         "\tmove.d [sp+],r9\n"
38         "\tjump r9\n"
39         "\tsetf\n"
40
41         "\t.section .fini\n"
42#ifdef __PIC__
43         "\tmove.d [sp+],r0\n"
44#endif
45         "\tmove.d [sp+],r9\n"
46         "\tjump r9\n"
47         "\tsetf\n");
48
49#else
50extern int Dummy;
51#endif
Note: See TracBrowser for help on using the repository browser.