diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-08-28 17:15:53 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-08-28 17:15:53 +0000 |
commit | 1220fd70ca9b9534a2b831bd9f937436968b5d07 (patch) | |
tree | 68fe1509bf46f230a610c8f9d3631ea94026dc8b /libc/sysdeps/linux/powerpc/crt0.c | |
parent | 22e8adca0dc97c39af187d1ce1ba1cd962b6ca0a (diff) |
This will hopefully make global constructors and destructors work
Diffstat (limited to 'libc/sysdeps/linux/powerpc/crt0.c')
-rw-r--r-- | libc/sysdeps/linux/powerpc/crt0.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/powerpc/crt0.c b/libc/sysdeps/linux/powerpc/crt0.c index b7e7f9b15..2460e910c 100644 --- a/libc/sysdeps/linux/powerpc/crt0.c +++ b/libc/sysdeps/linux/powerpc/crt0.c @@ -30,7 +30,23 @@ asm( "\tstwu 1,-32(1)\n" "\tmtlr 0\n" //"\tstw 0,0(1)\n" - "\tb _start2\n"); + "\tb _start2\n + + "); + +/* a little bit of stuff to support C++ */ +asm( + "\t.section .ctors,\"aw\"\n" + "\t.align 4\n" + "\t.global __CTOR_LIST__\n" + "__CTOR_LIST__:\n" + "\t.long -1\n" + "\t.section .dtors,\"aw\"\n" + "\t.align 4\n" + "\t.global __DTOR_LIST__\n" + "__DTOR_LIST__:\n" + "\t.long -1\n" + ); void __uClibc_main(int argc,void *argv,void *envp); |