aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/modules/Makefile
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@linux.intel.com>2011-04-07 21:02:02 +0100
committerMatt Fleming <matt.fleming@linux.intel.com>2011-04-26 09:53:24 +0100
commit990e7e1df3dc6fa456ff7cdaec7d239977557c8d (patch)
treedb0f41f9f1c96e6036a0e2af47ee0b20a9238d27 /com32/elflink/modules/Makefile
parentc6f10fb1b9b4f56fa6d7b6b73e1fdef96b63d912 (diff)
downloadsyslinux-990e7e1df3dc6fa456ff7cdaec7d239977557c8d.tar.gz
syslinux-990e7e1df3dc6fa456ff7cdaec7d239977557c8d.tar.xz
syslinux-990e7e1df3dc6fa456ff7cdaec7d239977557c8d.zip
elflink: Remove MODULE_MAIN() from executable ELF modules
To make it easier to move existing COM32 modules over to ELF modules without having to modify them we need to search for and run their main() functions when they're loaded instead of requiring their initial function to be labeled with MODULE_MAIN(). Currently, we require all executable ELF modules to specify their initial function with the use of the MODULE_MAIN() macro and not via the traditional method of naming it main(). However, there are weird restrictions on what functions can be passed to MODULE_MAIN(), for instance, they must be declared static. This patch makes life much simpler and allows executable ELF modules to be loaded without the MODULE_MAIN() wrapper, but rather by naming their initial function main(). All the modules in com32/modules can now be run as ELF modules without any modifications. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
Diffstat (limited to 'com32/elflink/modules/Makefile')
-rw-r--r--com32/elflink/modules/Makefile11
1 files changed, 1 insertions, 10 deletions
diff --git a/com32/elflink/modules/Makefile b/com32/elflink/modules/Makefile
index eb2d052f..8a274aef 100644
--- a/com32/elflink/modules/Makefile
+++ b/com32/elflink/modules/Makefile
@@ -18,7 +18,7 @@ CFLAGS += -I$(topdir)/core/elflink
MODULES = hello.c32 sort.c32 mytest.c32 menumain.c32 printmsg.c32 background.c32 passwd.c32 sha1hash.c32 \
unbase64.c32 sha512crypt.c32 md5.c32 crypt-md5.c32 sha256crypt.c32 get_key.c32 ansiraw.c32 test.c32 \
- meminfo.c32 menu.c32 drain.c32 dir.c32 pcitest.c32 vesainfo.c32 cpuid.c32 cpuidtest.c32
+ meminfo.c32 menu.c32 drain.c32 vesainfo.c32
TESTFILES =
@@ -84,18 +84,9 @@ meminfo.c32 : meminfo.o
pcitest.c32 : pcitest.o
$(LD) $(LDFLAGS) -o $@ $^
-dir.c32 : dir.o
- $(LD) $(LDFLAGS) -o $@ $^
-
vesainfo.c32 : vesainfo.o
$(LD) $(LDFLAGS) -o $@ $^
-cpuid.c32 : cpuid.o
- $(LD) $(LDFLAGS) -o $@ $^
-
-cpuidtest.c32 : cpuidtest.o
- $(LD) $(LDFLAGS) -o $@ $^
-
tidy dist:
rm -f *.o *.lo *.a *.lst .*.d