2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
7 #include <aros/kernel.h>
8 #include <aros/symbolsets.h>
9 #include <proto/hostlib.h>
11 #include "exec_intern.h"
13 static const char *libc_symbols
[] =
16 #ifdef HAVE_SWAPCONTEXT
24 static int Platform_Init(struct ExecBase
*SysBase
)
29 HostLibBase
= OpenResource("hostlib.resource");
30 D(bug("[exec] HostLibBase %p\n", HostLibBase
));
34 /* We use local variable for the handle because we never expunge
35 so we will never close it */
36 LibCHandle
= HostLib_Open(LIBC_NAME
, NULL
);
37 D(bug("[exec] libc handle 0x%p\n", LibCHandle
));
41 PD(SysBase
).SysIFace
= (struct LibCInterface
*)HostLib_GetInterface(LibCHandle
, libc_symbols
, &r
);
42 if (PD(SysBase
).SysIFace
)
44 D(bug("[exec] Got libc interface, %u unresolved symbols\n", r
));
48 HostLib_DropInterface((APTR
*)PD(SysBase
).SysIFace
);
49 HostLib_Close(LibCHandle
, NULL
);
55 ADD2INITLIB(Platform_Init
, 0);