1 #include <aros/debug.h>
2 #include <aros/kernel.h>
3 #include <aros/symbolsets.h>
4 #include <proto/hostlib.h>
6 #include "exec_intern.h"
8 static const char *libc_symbols
[] =
11 #ifdef HAVE_SWAPCONTEXT
19 static int Platform_Init(struct ExecBase
*SysBase
)
24 HostLibBase
= OpenResource("hostlib.resource");
25 D(bug("[exec] HostLibBase %p\n", HostLibBase
));
29 /* We use local variable for the handle because we never expunge
30 so we will never close it */
31 LibCHandle
= HostLib_Open(LIBC_NAME
, NULL
);
32 D(bug("[exec] libc handle 0x%p\n", LibCHandle
));
36 PD(SysBase
).SysIFace
= (struct LibCInterface
*)HostLib_GetInterface(LibCHandle
, libc_symbols
, &r
);
37 if (PD(SysBase
).SysIFace
)
39 D(bug("[exec] Got libc interface, %u unresolved symbols\n", r
));
43 HostLib_DropInterface((APTR
*)PD(SysBase
).SysIFace
);
44 HostLib_Close(LibCHandle
, NULL
);
50 ADD2INITLIB(Platform_Init
, 0);