elflink: Make ELF the default object format
authorMatt Fleming <matt.fleming@linux.intel.com>
Tue, 26 Apr 2011 08:59:53 +0000 (09:59 +0100)
committerMatt Fleming <matt.fleming@linux.intel.com>
Tue, 26 Apr 2011 09:04:59 +0000 (10:04 +0100)
commit74518b8b691c8aba1425673864c45b7721d9a738
tree2b0d26c3617cabfd1c5e60bc046fd872014def4a
parent8f10ba6d251ac05b54f183cb98bf5310a0675338
elflink: Make ELF the default object format

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>
50 files changed:
com32/Makefile
com32/cmenu/Makefile
com32/elflink/ldlinux/Makefile
com32/elflink/modules/Makefile [deleted file]
com32/elflink/modules/README [deleted file]
com32/elflink/modules/ansiraw.c [deleted file]
com32/elflink/modules/background.c [deleted file]
com32/elflink/modules/base64.h [deleted file]
com32/elflink/modules/crypt-md5.c [deleted file]
com32/elflink/modules/drain.c [deleted file]
com32/elflink/modules/get_key.c [deleted file]
com32/elflink/modules/md5.c [deleted file]
com32/elflink/modules/md5.h [deleted file]
com32/elflink/modules/meminfo.c [deleted file]
com32/elflink/modules/menu.c [deleted file]
com32/elflink/modules/menu.h [deleted file]
com32/elflink/modules/menumain.c [deleted file]
com32/elflink/modules/modules.dep [deleted file]
com32/elflink/modules/mytest.c [deleted file]
com32/elflink/modules/passwd.c [deleted file]
com32/elflink/modules/printmsg.c [deleted file]
com32/elflink/modules/refstr.h [deleted file]
com32/elflink/modules/sha1.h [deleted file]
com32/elflink/modules/sha1hash.c [deleted file]
com32/elflink/modules/sha256crypt.c [deleted file]
com32/elflink/modules/sha512crypt.c [deleted file]
com32/elflink/modules/test.c [deleted file]
com32/elflink/modules/unbase64.c [deleted file]
com32/elflink/modules/vesainfo.c [deleted file]
com32/gfxboot/Makefile
com32/gpllib/Makefile
com32/hdt/Makefile
com32/include/cli.h [moved from com32/elflink/modules/cli.h with 100% similarity]
com32/include/sort.h [moved from com32/elflink/modules/sort.h with 100% similarity]
com32/lib/Makefile
com32/libutil/Makefile
com32/libutil/quicksort.c [moved from com32/elflink/modules/sort.c with 80% similarity]
com32/lua/src/Makefile
com32/mboot/Makefile
com32/menu/Makefile
com32/modules/Makefile
com32/modules/hello.c [moved from com32/elflink/modules/hello.c with 100% similarity]
com32/modules/meminfo.c
com32/modules/vesainfo.c
com32/samples/Makefile
com32/sysdump/Makefile
elf_gen_dep.sh
mk/com32.mk
mk/elf.mk
mk/rosh.mk