path: root/com32/elflink/modules/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* elflink: Make ELF the default object formatMatt Fleming2011-04-261-103/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/elflink/modules was originally created to house ELF modules and keep them separate from the COM32 modules as the elflink branch was being developed. However, this has inadvertently created a maintenance nightmare because code was copied from elsewhere in the tree into com32/elflink/modules, resulting in duplication. Bug fixes have been going into the original code but have not been merged onto the elflink branch, leaving the duplicate code in com32/elflink/modules buggy. So let's delete this directory. There really is no reason to keep ELF and COM32 modules separate because there's no reason to need both COM32 and ELF modules to coexist. ELF is a far superior object file format and all modules are not emitted as ELF objects. Now that we're outputting ELF modules we can use dynamic memory instead of the cs_bounce bounce buffer. This commit requires a certain amount of shuffling for some files. quicksort.c isn't a module and belongs as part of the util library. cli.h belongs in com32/include so that other modules can make use of the cli code in ldlinux.c32. All libraries are now ELF shared libraries which are only loaded to fixup unresolved symbols for executable modules and renamed from *.a to *.c32. This reduces the runtime memory footprint because libraries are only loaded when needed and because every executable no longer gets its own copy of code/data (as it would if linking with a static library). Also, remove MINLIBOBJS from libcom32.c32 because it is already part of libcom32min.a and we don't want to have any duplicate symbols between the core (which links with libcom32min.a) and libcom32.c32. Welcome to the New World Order of ELF modules! Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* elflink: Remove MODULE_MAIN() from executable ELF modulesMatt Fleming2011-04-261-10/+1
| | | | | | | | | | | | | | | | | | | | 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>
* elflink: Move elf MCONFIG to mk/elf.mkMatt Fleming2011-04-261-1/+2
| | | | | | | Catch up with recent changes to the Makefile fragments in the MCONFIG files. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* elflink: Move code out of core and into ldlinux.c32Matt Fleming2011-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is a lot of code in core/elflink that is not strictly required for the core to function. There are benefits to keeping the core proper as small as possible, for example so that it can fit within a single 64K block on btrfs. So move the following pieces of code out of core/elflink and into a new ldlinux ELF module which will be automatically loaded by the core: - command line interface code - C configuration parser - refstr implementation - rest of the menu system Below are some measurements of the size of ldlinux.elf before and after this change. Before: text data bss dec hex filename 161328 10439 913468 1085235 108f33 core/ldlinux.elf After: text data bss dec hex filename 142423 10415 909500 1062338 1035c2 core/ldlinux.elf Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* elflink: Remove *.c32 on 'make clean'Matt Fleming2011-03-081-1/+1
| | | | | | The clean target should also remove any .c32 files. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* elflink: add several files to com32/elflink/modulesFeng Tang2010-07-201-1/+20
| | | | | | | | They are meminfo/pcitest/dir/vesainfo/cpuid/cpuidtest. But not all of their .c32 works. One note from vesainfo.c32 is, we need change all cs_bounce usage to lmalloc/free
* elflink: copy some elflink related files overFeng Tang2010-07-201-0/+90
also make sure the compiling passed