aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Bucur <stefanb@zytor.com>2008-08-16 13:03:58 +0300
committerStefan Bucur <stefan@stefan-ubumac.(none)>2009-03-15 10:12:28 +0200
commite89484810ee462a2a383c096d4d9d6b5f1303ee9 (patch)
treec0ad5f675920f6026aa6c8de35be7245942430c5
parent8dc432ed00ad7767049c76f5d3b22fd0fdc323ea (diff)
downloadsyslinux-elf-e89484810ee462a2a383c096d4d9d6b5f1303ee9.tar.gz
syslinux-elf-e89484810ee462a2a383c096d4d9d6b5f1303ee9.tar.xz
syslinux-elf-e89484810ee462a2a383c096d4d9d6b5f1303ee9.zip
Shrinked the COM32 module from 34K to 25K.
-rw-r--r--com32/elflink/Makefile4
-rw-r--r--com32/lib/Makefile46
2 files changed, 30 insertions, 20 deletions
diff --git a/com32/elflink/Makefile b/com32/elflink/Makefile
index 5691d66e..5995509b 100644
--- a/com32/elflink/Makefile
+++ b/com32/elflink/Makefile
@@ -87,11 +87,11 @@ test_memalign.elf : test_memalign.o $(LIBS)
test_com32.elf: CFLAGS += -DELF_DEBUG
test_com32.elf: test_com32.o ../libutil/libutil_com.a ../lib/libcom32min.a $(LIBGCC)
- $(LD) -n $(LDFLAGS) -o $@ test_com32.o ../libutil/libutil_com.a $(LIBGCC) --whole-archive ../lib/libcom32min.a
+ $(LD) -n $(LDFLAGS) -o $@ test_com32.o ../libutil/libutil_com.a $(LIBGCC) --whole-archive ../lib/libcom32min.a -Map test_com32.map
$(OBJCOPY) --extract-symbol $@ _root_.dyn
tidy dist:
- rm -f *.o *.lo *.a *.lst *.elf .*.d
+ rm -f *.o *.lo *.a *.lst *.elf .*.d *.map
clean: tidy
rm -f *.lss *.c32 *.lnx *.com *.dyn
diff --git a/com32/lib/Makefile b/com32/lib/Makefile
index 0f541b85..b1387e68 100644
--- a/com32/lib/Makefile
+++ b/com32/lib/Makefile
@@ -7,6 +7,7 @@ NOGPL := 1
topdir = ../..
include MCONFIG
+## OPTIONAL OBJECTS, AVAILABLE AS DYNAMIC LINKED MODULES
# PNG library object files
LIBPNG_OBJS = \
libpng/png.o libpng/pngset.o libpng/pngget.o libpng/pngrutil.o \
@@ -41,22 +42,9 @@ LIBPCI_OBJS = \
pci/readb.o pci/readw.o pci/readl.o pci/readbios.o \
pci/writeb.o pci/writew.o pci/writel.o pci/writebios.o
-# COM32 core object files
-LIBENTRY_OBJS = \
- sys/intcall.o sys/farcall.o sys/cfarcall.o sys/zeroregs.o \
- sys/entry.o sys/exit.o sys/argv.o sys/times.o \
- sys/fileinfo.o sys/opendev.o sys/read.o sys/write.o sys/ftell.o \
- sys/close.o sys/open.o sys/fileread.o sys/fileclose.o \
- sys/isatty.o sys/fstat.o
-
-LIBMODULE_OBJS = \
- sys/module/common.o sys/module/elf_module.o \
- sys/module/shallow_module.o sys/module/elfutils.o \
- sys/module/exec.o
-
LIBSYSLINUX_OBJS = \
- syslinux/idle.o syslinux/reboot.o \
- syslinux/features.o syslinux/config.o syslinux/serial.o \
+ syslinux/reboot.o \
+ syslinux/features.o syslinux/config.o \
syslinux/ipappend.o syslinux/dsinfo.o syslinux/version.o \
\
syslinux/addlist.o syslinux/freelist.o syslinux/memmap.o \
@@ -77,6 +65,24 @@ LIBSYSLINUX_OBJS = \
\
syslinux/adv.o syslinux/advwrite.o syslinux/getadv.o \
syslinux/setadv.o
+
+
+## CORE OBJECTS, INCLUDED IN THE ROOT COM32 MODULE
+LIBENTRY_OBJS = \
+ sys/intcall.o sys/farcall.o sys/cfarcall.o sys/zeroregs.o \
+ sys/entry.o sys/exit.o sys/argv.o sys/times.o \
+ sys/fileinfo.o sys/opendev.o sys/read.o sys/write.o sys/ftell.o \
+ sys/close.o sys/open.o sys/fileread.o sys/fileclose.o \
+ sys/isatty.o sys/fstat.o \
+ \
+ syslinux/idle.o
+
+LIBMODULE_OBJS = \
+ sys/module/common.o sys/module/elf_module.o \
+ sys/module/shallow_module.o sys/module/elfutils.o \
+ sys/module/exec.o
+
+
LIBGCC_OBJS = \
libgcc/__ashldi3.o libgcc/__udivdi3.o \
@@ -97,7 +103,9 @@ LIBCONSOLE_OBJS = \
\
sys/ansi.o \
\
- sys/ansicon_write.o sys/ansiserial_write.o
+ sys/ansicon_write.o sys/ansiserial_write.o \
+ \
+ syslinux/serial.o
LIBOTHER_OBJS = \
abort.o atexit.o atoi.o atol.o atoll.o calloc.o creat.o \
@@ -150,17 +158,19 @@ LIBOTHER_OBJS = \
MINLIBOBJS = \
$(LIBOTHER_OBJS) \
$(LIBENTRY_OBJS) \
- $(LIBSYSLINUX_OBJS) \
$(LIBGCC_OBJS) \
$(LIBCONSOLE_OBJS) \
$(LIBMODULE_OBJS)
+
DYNLIBOBJS = \
$(LIBZLIB_OBJS) \
$(LIBPNG_OBJS) \
$(LIBJPG_OBJS) \
$(LIBPCI_OBJS) \
- $(LIBVESA_OBJS)
+ $(LIBVESA_OBJS) \
+ $(LIBSYSLINUX_OBJS)
+
LIBOBJS = \
$(MINLIBOBJS) \