1 /* Minimal main program -- everything is loaded from the library */
3 #include <l4/re/elf_aux.h>
4 L4RE_ELF_AUX_ELEM_T(l4re_elf_aux_mword_t, _stack_size,
5 L4RE_ELF_AUX_T_STACK_SIZE, 8 * 1024 * 1024);
9 #include <floatingpoint.h>
16 handle = dlopen("rom/_functools.so", 2);
18 printf("%s: %s\n", __func__, dlerror());
25 char *buf = (char *)malloc(sizeof(char) * 100);
26 if (fgets(buf, 100, stdin) == NULL) {
27 printf("fgets error\n");
29 printf("buf=%s\n", buf);
40 fp = fopen("_collections.so", "r");
42 printf("fopen failed\n");
46 if (fstat(fileno(fp), &statb) != 0) {
47 printf("fstat failed\n");
51 printf("fstat dev=%lld ino=%ld\n", statb.st_dev, statb.st_ino);
57 main(int argc, char **argv)
62 /* 754 requires that FP exceptions run in "no stop" mode by default,
63 * and until C vendors implement C99's ways to control FP exceptions,
64 * Python requires non-stop mode. Alas, some platforms enable FP
65 * exceptions by default. Here we disable them.
71 fpsetmask(m & ~FP_X_OFL);
73 return Py_Main(argc, argv);