aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/modules/hello.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/elflink/modules/hello.c')
-rw-r--r--com32/elflink/modules/hello.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/com32/elflink/modules/hello.c b/com32/elflink/modules/hello.c
index f396c794..d1054a1f 100644
--- a/com32/elflink/modules/hello.c
+++ b/com32/elflink/modules/hello.c
@@ -4,17 +4,8 @@
*/
#include <stdio.h>
+#include <sys/module.h>
-typedef int (*module_init_t)(void);
-typedef void (*module_exit_t)(void);
-
-#define __used __attribute__((used))
-
-#define MODULE_INIT(fn) static module_init_t __module_init \
- __used __attribute__((section(".ctors_module"))) = fn
-
-#define MODULE_EXIT(fn) static module_exit_t __module_exit \
- __used __attribute__((section(".dtors_module"))) = fn
static int hello_init(void) {
printf("Hello, world, from 0x%08X!\n", (unsigned int)&hello_init);