path: root/com32/elflink/ldlinux/Makefile
diff options
authorMatt Fleming <matt.fleming@intel.com>2012-03-22 15:31:43 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-03-23 16:54:47 +0000
commit8e0ed96bff75801f7430da88d83ea1b52827b123 (patch)
tree8435f50b9a37407b3591576636d285f012cd39ee /com32/elflink/ldlinux/Makefile
parenta0ff1769893dc47028694ee51824bf681672876c (diff)
elf: Support __constructor and __destructor
The old way of specifying functions that need to be run before/after a main function has never worked for ELF modules. Instead, the only way to get similiar behaviour was by using the MODULE_INIT() and MODULE_EXIT() macros, but no one seems to have bothered converting the old __constructor users over. Anyway, the old way is superior because it allows multiple functions be specified. Delete the MODULE_* macros as there's only one user of them in the entire tree. We can also get rid of the UNKNOWN_MODULE constant because now a module doesn't need a __module_init_ptr symbol to be classed as a library - if a module isn't an executable, it's a library, there's no such thing as an unknown type. It's no longer necessary to explicitly call __syslinux_get_ipappend_strings() from ldlinux.c because the __constructor tag on the version in com32/lib/syslinux will take care of invoking it before ldlinux.c32's main() is executed. Also, since we've refactored unload_module() to now run a module's destructors let's minimise the number of callers by deleting load_library() and unload_library(), which were only called by the test module in com32/elflink. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/Makefile')
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/Makefile b/com32/elflink/ldlinux/Makefile
index 99602771..ca4c7e25 100644
--- a/com32/elflink/ldlinux/Makefile
+++ b/com32/elflink/ldlinux/Makefile
@@ -20,7 +20,7 @@ LIBS = --whole-archive $(com32)/lib/libcom32min.a
all: ldlinux.c32 ldlinux_lnx.a
ldlinux.c32 : ldlinux.o cli.o readconfig.o refstr.o colors.o getadv.o \
- adv.o ipappend.o execute.o kernel.o get_key.o \
+ adv.o execute.o kernel.o get_key.o \
advwrite.o setadv.o eprintf.o
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)