Index: uspace/lib/c/generic/elf/elf_load.c
===================================================================
--- uspace/lib/c/generic/elf/elf_load.c	(revision af8bda0f3d3547999b99c77e5b3831e1419e973d)
+++ uspace/lib/c/generic/elf/elf_load.c	(revision a97b8384c55f18fa1f4cc60cf5a00adf24802806)
@@ -112,4 +112,5 @@
 	pcb->dynamic = info->finfo.dynamic;
 	pcb->rtld_runtime = info->env;
+	pcb->cpp_data = info->finfo.cpp_data;
 }
 
Index: uspace/lib/c/generic/elf/elf_mod.c
===================================================================
--- uspace/lib/c/generic/elf/elf_mod.c	(revision af8bda0f3d3547999b99c77e5b3831e1419e973d)
+++ uspace/lib/c/generic/elf/elf_mod.c	(revision a97b8384c55f18fa1f4cc60cf5a00adf24802806)
@@ -198,4 +198,9 @@
 	size_t phdr_len = header->e_phnum * header->e_phentsize;
 
+	elf->info->interp = NULL;
+	elf->info->dynamic = NULL;
+	elf->info->cpp_data.ctors_count = 0;
+	elf->info->cpp_data.dtors_count = 0;
+
 	if (phdr_len > sizeof(phdr)) {
 		DPRINTF("more than %d program headers\n", phdr_cap);
Index: uspace/lib/c/generic/libc.c
===================================================================
--- uspace/lib/c/generic/libc.c	(revision af8bda0f3d3547999b99c77e5b3831e1419e973d)
+++ uspace/lib/c/generic/libc.c	(revision a97b8384c55f18fa1f4cc60cf5a00adf24802806)
@@ -61,6 +61,16 @@
 #endif
 
+static bool env_setup = false;
 
-static bool env_setup = false;
+/**
+ * Used for C++ constructors/destructors
+ * and the GCC constructor/destructor extension.
+ */
+typedef void (*init_array_entry_t)();
+extern init_array_entry_t __init_array_start[];
+extern init_array_entry_t __init_array_end[];
+typedef void (*fini_array_entry_t)();
+extern fini_array_entry_t __fini_array_start[];
+extern fini_array_entry_t __fini_array_end[];
 
 void __libc_main(void *pcb_ptr)
@@ -115,4 +125,12 @@
 
 	/*
+	 * C++ Static constructor calls.
+	 */
+	ptrdiff_t init_array_entries = (__init_array_end - __init_array_start);
+
+	for (int i = init_array_entries - 1; i > 0; --i)
+		__init_array_start[i]();
+
+	/*
 	 * Run main() and set task return value
 	 * according the result
@@ -124,4 +142,14 @@
 void __libc_exit(int status)
 {
+	/*
+	 * GCC extension __attribute__((destructor)),
+	 * C++ destructors are added to __cxa_finalize call
+	 * when the respective constructor is called.
+	 */
+	ptrdiff_t fini_array_entries = (__fini_array_end - __fini_array_start);
+
+	for (int i = 0; i < fini_array_entries; ++i)
+		__fini_array_start[i]();
+
 	if (env_setup) {
 		__stdio_done();
