From 85414cb1916d02bea79ee806faf953eccd0db9ca Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Tue, 6 May 2003 11:13:31 +0000 Subject: no message --- crt.s | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 crt.s (limited to 'crt.s') diff --git a/crt.s b/crt.s new file mode 100644 index 0000000..66e9575 --- /dev/null +++ b/crt.s @@ -0,0 +1,34 @@ + + .seg ".text" + + .global _start + +_start: + clr %fp + + orcc 0,%g1,%o0 + be no_atexit + sub %sp,32,%sp + + call atexit + nop + +no_atexit: + sethi %hi _fini,%o0 + call _init + or %o0,%lo _fini,%o0 + + ld [%sp+32+64],%o0 + add 32+68,%sp,%o1 + sll %o0,2,%o2 + inc 4,%o2 + set _environ,%o3 + call main + add %o1,%o2,%o2 + + call exit + nop + + call _exit + nop + -- cgit v1.2.3