diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-06 20:07:34 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-06 20:07:34 +0000 |
commit | 501d312a91f66a56f4958f399d9fe30465a86437 (patch) | |
tree | 275d5093b512a8a751efff5f79f0184da243fbd7 /c/src/lib/libbsp/h8300/h8sim/startup/__main.c | |
parent | Added missing #endif's. (diff) | |
download | rtems-501d312a91f66a56f4958f399d9fe30465a86437.tar.bz2 |
Added baseline for h8 simulator BSP to support the simulator in gdb 5.0
Diffstat (limited to 'c/src/lib/libbsp/h8300/h8sim/startup/__main.c')
-rw-r--r-- | c/src/lib/libbsp/h8300/h8sim/startup/__main.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/h8300/h8sim/startup/__main.c b/c/src/lib/libbsp/h8300/h8sim/startup/__main.c new file mode 100644 index 0000000000..4169cea605 --- /dev/null +++ b/c/src/lib/libbsp/h8300/h8sim/startup/__main.c @@ -0,0 +1,22 @@ +/* + * Copied from newlib 1.8.2 + * + * $Id$ + */ + +void __main () +{ + static int initialized; + if (! initialized) + { + typedef void (*pfunc) (); + extern pfunc __ctors[]; + extern pfunc __ctors_end[]; + pfunc *p; + + initialized = 1; + for (p = __ctors_end; p > __ctors; ) + (*--p) (); + + } +} |