4.104.114.84.95
Last change
on this file since 64f8ae4 was
64f8ae4,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/18/03 at 19:20:55
|
2003-03-18 Till Straumann <strauman@…>
PR 356/bsps
This patch makes RTEMS/powerpc/shared EABI compliant.
- irq/irq_init.c, start/Makefile.am, start/start.S, startup/bspstart.c,
startup/pgtbl_setup.c, vectors/vectors.h, vectors/vectors_init.c:
zero_bss() should clear not only bss but sbss and sbss2
also (this is probably a bugfix, as sbss/sbss2 are
probably used even if -msdata=eabi is not specified).
- start/rtems_crti.S: New file which must
be linked immediately after ecrti.o. rtems_crti.o contains
a code snippet who lets init() return immediately. Also,
a new entry point '_init' to the C++ Ctors is generated
for use by the RTEMS Thread_Handler.
|
-
Property mode set to
100644
|
File size:
830 bytes
|
Line | |
---|
1 | /* rtems_crti.S */ |
---|
2 | #include <asm.h> |
---|
3 | #include <rtems/score/cpu.h> |
---|
4 | #include <libcpu/io.h> |
---|
5 | |
---|
6 | /* terminate the __init() function and create |
---|
7 | * a new head '_init' for use by RTEMS to |
---|
8 | * invoke C++ global constructors |
---|
9 | * NOTE: it is essential that this snippet |
---|
10 | * is hooked between ecrti and crtbegin |
---|
11 | * |
---|
12 | * ecrti has the following .init section: |
---|
13 | * __init: |
---|
14 | * stwu r1,-16(r1) |
---|
15 | * mflr r0 |
---|
16 | * stw r0,20(r1) |
---|
17 | * |
---|
18 | * The reason for this is that we want to call |
---|
19 | * __eabi() at an early stage but prevent __eabi() |
---|
20 | * from branching to __init (C++ exception init |
---|
21 | * and global CTORs). Hence we make __init a no-op |
---|
22 | * and create a new entry point: |
---|
23 | */ |
---|
24 | .section ".init","ax" |
---|
25 | .align 2 |
---|
26 | lwz r0,r20(r1) |
---|
27 | mtlr r0 |
---|
28 | addi r1,r1,16 |
---|
29 | blr |
---|
30 | .globl _init |
---|
31 | .type _init,@function |
---|
32 | _init: |
---|
33 | stwu r1,-16(r1) |
---|
34 | mflr r0 |
---|
35 | stw r0,20(r1) |
---|
Note: See
TracBrowser
for help on using the repository browser.