com32: Put deleted object files back into the Makefile
For some reason that I can't understand, some object files were
removed from this Makefile in the following commit,
|commit
0cb6490fa96f752c01bbb9add2c9ca6dbf99ece2
|Author: Feng Tang <feng.tang@intel.com>
|Date: Thu Jun 3 10:48:22 2010 +0800
|
| elflink: start merge with pathbased branch
|
| modify these files to make compile pass
|
| modified: com32/MCONFIG
| modified: com32/Makefile
| modified: com32/include/klibc/compiler.h
| modified: com32/include/sys/elfcommon.h
| modified: com32/lib/Makefile
| modified: com32/lib/free.c
| modified: com32/lib/malloc.c
However, with this patch things continue to compile correctly so I'm
unsure why they were ever removed. Furthermore, pieces of code in
com32/ refer to symbols defined in these these object files and so
they are required in order to load modules.
These missing object files were discovered when loading libcom32.c32,
which wouldn't load because it was complaining about unresolved
symbols.
The removal of core/strncasecmp.c needs some explanation. There are
currently two identical copies of strncasecmp.c, one in com32/lib and
one in core/, and while the core copy is part of core/libcom32.a, the
copy in com32/lib isn't compiled. Now, because there are no references
to strncasecmp within core/ the symbol isn't pulled in from libcom32.a
and exported as a global symbol by the core. So, if ELF modules have
references to strncasecmp they cannot be resolved at runtime.
To fix this I've included strncasecmp.o in libcom32min.a which
isolinux.elf, ldlinux.elf and pxelinux.elf link against with
--whole-archive, which means that even if there are no references to
strncasecmp within the core, that symbol is still exported.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>