genode/repos/libports/src/test/fatfs_blkio/component.cc
Christian Helmuth cbfec0deed ldso: check ctors sections of shared-object deps
The sole existence of shared-object dependencies lead to fatal
static-constructor errors before. Now, ldso checks if the ctors section
of objects in the init list are non-empty before whining.

Issue #2759
2018-05-30 12:26:18 +02:00

16 lines
327 B
C++

#include <fatfs/block.h>
#include <base/heap.h>
#include <libc/component.h>
extern int main (int argc, char* argv[]);
void Libc::Component::construct(Libc::Env &env)
{
Genode::Heap heap(env.ram(), env.rm());
Fatfs::block_init(env, heap);
int r = 0;
Libc::with_libc([&r] () { r = main(0, 0); });
env.parent().exit(r);
}