elflink: ldlinux should not have any dependencies
authorMatt Fleming <matt.fleming@linux.intel.com>
Tue, 26 Apr 2011 09:02:13 +0000 (10:02 +0100)
committerMatt Fleming <matt.fleming@linux.intel.com>
Tue, 26 Apr 2011 09:05:38 +0000 (10:05 +0100)
commit10bbdc271f2c8457748d01efb466e881dd1c361e
tree843139a5c0c10fb0b42fd4765fa9b31d66281a73
parent5af736cf7677485da73bdc7ea4633960c8640cb6
elflink: ldlinux should not have any dependencies

ldlinux currently requires the get_key() symbol, which means it has a
dependency on libutil_com.c32. ldlinux.c32 really should be a
standalone module so let's move get_key.c into ldlinux/.

However, moving get_key.c creates a new problem - native linux
applications such as com32/samples/keytest.c require the get_key()
symbol which is currently exported by libutil_lnx.a. To fix this, we
create a new native linux library that exports any required symbols
from ldlinux. With this change we need to update com32/Makefile so
that we build com32/elfink/ldlinux before com32/samples, and seeing as
ldlinux now has no dependencies, we may as well move it to the front
of $SUBDIRS.

Also, update elf_gen_dep.sh to skip ldlinux.c32 and not search for
dependencies for any of its unresolved symbols. This way, if anyone
inadvertently introduces a dependency that cannot be resolved by the
core, ldlinux.c32 will fail to load at runtime (which guarantees that
the newly introduced dependency won't go unnoticed).

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
com32/Makefile
com32/elflink/ldlinux/Makefile
com32/elflink/ldlinux/get_key.c [moved from com32/libutil/get_key.c with 100% similarity]
com32/libutil/Makefile
elf_gen_dep.sh
mk/elf.mk