From 430e386b9e69bf3a71c0e2cc06b7094d53ab6501 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 20 Oct 2000 00:03:55 +0000 Subject: Strip all object files of all non global symbols and .note and .comment, saving a lot of space in the resultant binaries... -Erik --- libc/sysdeps/linux/i386/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'libc/sysdeps/linux/i386/Makefile') diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile index 695450961..4ec84b3be 100644 --- a/libc/sysdeps/linux/i386/Makefile +++ b/libc/sysdeps/linux/i386/Makefile @@ -31,9 +31,13 @@ ASMOBJS=$(shell ./list_syscalls.sh) SSRC=_start.S setjmp.S longjmp.S #fork.S #clone.S SOBJS=$(patsubst %.S,%.o, $(SSRC)) +MSRC=syscalls.c +MOBJ=read.o write.o __open.o close.o + CSRC=readdir.c #select.c COBJS=$(patsubst %.c,%.o, $(CSRC)) -OBJS=$(SOBJS) $(ASMOBJS) $(COBJS) + +OBJS=$(SOBJS) $(ASMOBJS) $(COBJS) $(MOBJ) all: $(OBJS) $(LIBC) @@ -45,12 +49,19 @@ ar-target: $(OBJS) $(ASMOBJS): $(ASMSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o + $(STRIPTOOL) -x -R .note -R .comment $*.o $(SOBJS): $(SSRC) + $(CC) $(CFLAGS) $< -c -o $*.o + $(STRIPTOOL) -x -R .note -R .comment $*.o -$(COBJS): $(CSRC) +$(MOBJ): $(MSRC) + $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o + $(STRIPTOOL) -x -R .note -R .comment $*.o -$(OBJS): Makefile +$(COBJS): + $(CC) $(CFLAGS) $< -c -o $*.o + $(STRIPTOOL) -x -R .note -R .comment $*.o clean: rm -f *.[oa] *~ core -- cgit v1.2.3