[syslinux:elflink] elflink: modify Makefile to solve the undefined symbol problem
syslinux-bot for Feng Tang
feng.tang at intel.com
Thu Aug 12 21:03:15 PDT 2010
Commit-ID: 530a32ac347a466b15c05951afbf544bf972c38f
Gitweb: http://syslinux.zytor.com/commit/530a32ac347a466b15c05951afbf544bf972c38f
Author: Feng Tang <feng.tang at intel.com>
AuthorDate: Fri, 18 Jun 2010 13:27:31 +0800
Committer: Feng Tang <feng.tang at intel.com>
CommitDate: Tue, 20 Jul 2010 11:10:03 +0800
elflink: modify Makefile to solve the undefined symbol problem
* use --whole-archive to let extlinux.elf contain all the mini com32 lib
* remove several tool funcs from com32/lib/Makefile which is
now implemented in core
---
com32/lib/Makefile | 6 ++++--
core/Makefile | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/com32/lib/Makefile b/com32/lib/Makefile
index 2c15b9d..f803af6 100755
--- a/com32/lib/Makefile
+++ b/com32/lib/Makefile
@@ -106,6 +106,7 @@ LIBCONSOLE_OBJS = \
\
syslinux/serial.o
+ #sys/readdir.o getcwd.o chdir.o fdopendir.o
LIBOTHER_OBJS = \
atoi.o atol.o atoll.o calloc.o creat.o \
ctypes.o errno.o fgetc.o fgets.o fopen.o fprintf.o fputc.o \
@@ -117,7 +118,7 @@ LIBOTHER_OBJS = \
sprintf.o srand48.o sscanf.o strcasecmp.o strcat.o \
strchr.o strcmp.o strcpy.o strdup.o strerror.o strlen.o \
strnlen.o \
- strncasecmp.o strncat.o strncmp.o strncpy.o strndup.o \
+ strncat.o strncmp.o strncpy.o strndup.o \
stpcpy.o stpncpy.o \
strntoimax.o strntoumax.o strrchr.o strsep.o strspn.o strstr.o \
strtoimax.o strtok.o strtol.o strtoll.o strtoul.o strtoull.o \
@@ -129,7 +130,7 @@ LIBOTHER_OBJS = \
\
dprintf.o vdprintf.o \
\
- sys/readdir.o getcwd.o chdir.o fdopendir.o \
+ getcwd.o fdopendir.o \
\
libgcc/__ashldi3.o libgcc/__udivdi3.o \
libgcc/__negdi2.o libgcc/__ashrdi3.o libgcc/__lshrdi3.o \
@@ -164,6 +165,7 @@ MINLIBOBJS = \
$(LIBCONSOLE_OBJS) \
$(LIBLOAD_OBJS) \
$(LIBMODULE_OBJS) \
+ $(LIBZLIB_OBJS)
# $(LIBVESA_OBJS)
diff --git a/core/Makefile b/core/Makefile
index 9c78a00..684e048 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -50,7 +50,8 @@ COBJ := $(patsubst %.c,%.o,$(CSRC))
SOBJ := $(patsubst %.S,%.o,$(SSRC))
LIB = libcom32.a
-LIBS = $(LIB) $(com32)/lib/libcom32min.a $(LIBGCC)
+LIBS = $(LIB) --whole-archive $(com32)/lib/libcom32min.a
+LIBDEP = $(filter-out -% %start%,$(LIBS))
LIBOBJS = $(COBJ) $(SOBJ)
NASMDEBUG = -g -F dwarf
@@ -88,7 +89,7 @@ kwdhash.gen: keywords genhash.pl
-DHEXDATE="$(HEXDATE)" \
-l $(@:.o=.lsr) -o $@ -MP -MD .$@.d $<
-%.elf: %.o $(LIBS) syslinux.ld
+%.elf: %.o $(LIBDEP) syslinux.ld
$(LD) $(LDFLAGS) -Bsymbolic -pie -E --hash-style=gnu -T syslinux.ld -M -o $@ $< \
--start-group $(LIBS) --end-group \
> $(@:.elf=.map)
More information about the Syslinux-commits
mailing list