aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/modules/hello.c
diff options
context:
space:
mode:
authorStefan Bucur <stefanb@zytor.com>2008-08-11 16:48:30 +0300
committerStefan Bucur <stefan@stefan-ubumac.(none)>2009-03-15 10:10:50 +0200
commitfac2992f2848ce2a630ba03f3a9f43d5928297ae (patch)
tree93ae9e8db310a5bf162e9dc47ba70ffc03283397 /com32/elflink/modules/hello.c
parenta1eecd49327fadb68988f5132fa288dc99c19113 (diff)
downloadsyslinux-elf-fac2992f2848ce2a630ba03f3a9f43d5928297ae.tar.gz
syslinux-elf-fac2992f2848ce2a630ba03f3a9f43d5928297ae.tar.xz
syslinux-elf-fac2992f2848ce2a630ba03f3a9f43d5928297ae.zip
Reorganized the module system in a consistent API.
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);