From 1220fd70ca9b9534a2b831bd9f937436968b5d07 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 28 Aug 2001 17:15:53 +0000 Subject: This will hopefully make global constructors and destructors work --- libc/sysdeps/linux/i386/crt0.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libc/sysdeps/linux/i386/crt0.c') diff --git a/libc/sysdeps/linux/i386/crt0.c b/libc/sysdeps/linux/i386/crt0.c index c40224ca6..0498d06e1 100644 --- a/libc/sysdeps/linux/i386/crt0.c +++ b/libc/sysdeps/linux/i386/crt0.c @@ -24,6 +24,13 @@ extern void __uClibc_main(int argc,void *argv,void *envp); +/* a little bit of stuff to support C++ */ +__asm__(".section .ctors,\"aw\"\n.align 4\n.global __CTOR_LIST__\n" + "__CTOR_LIST__:\n.long -1\n"); + +__asm__(".section .dtors,\"aw\"\n.align 4\n.global __DTOR_LIST__\n" + "__DTOR_LIST__:\n.long -1\n"); + void _start(unsigned int first_arg) { unsigned int argc; -- cgit v1.2.3