Subject: bin/425: making ld.so a bit smaller
To: None <gnats-admin>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 08/20/1994 17:20:10
>Number:         425
>Category:       bin
>Synopsis:       making ld.so a bit smaller (needs no floating point formatting)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 20 17:20:08 1994
>Originator:     Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:        
>Environment:
	
System: NetBSD ed209 1.0_BETA NetBSD 1.0_BETA (ED209) #0: Sat Aug 20 03:10:19 MET DST 1994 thomas@ed209:/usr/src/sys/arch/i386/compile/ED209 i386

Machine: i386
>Description:
	ld.so is currently linked with the full vfprintf from the C library.
	Since it doesn't need the floating point formatting capabilities
	they can be removed to get 16KB (on the i386 at least) back.
>How-To-Repeat:
	
>Fix:
*** lib/libc/stdio/vfprintf.c-	Mon May 23 12:26:03 1994
--- lib/libc/stdio/vfprintf.c	Sat Aug 20 15:16:58 1994
***************
*** 61,67 ****
--- 61,69 ----
  #include "fvwrite.h"
  
  /* Define FLOATING_POINT to get floating point. */
+ #ifndef NO_FLOATING_POINT
  #define	FLOATING_POINT
+ #endif
  
  /*
   * Flush out all the vectors defined by the given uio,
*** gnu/usr.bin/ld/rtld/Makefile-	Sat Jan 29 11:24:56 1994
--- gnu/usr.bin/ld/rtld/Makefile	Sat Aug 20 15:17:18 1994
***************
*** 1,18 ****
  #	$Id: Makefile,v 1.8 1994/01/28 21:01:20 pk Exp $
  
  PROG=	ld.so
! SRCS=	mdprologue.S rtld.c malloc.c shlib.c etc.c md.c
  NOMAN=	noman
  LDDIR?= $(.CURDIR)/..
  #PICFLAG=-pic
  PICFLAG=-fpic
! CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE_ARCH) $(PICFLAG) -DRTLD
  LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic
  ASFLAGS+=-k
  LDADD+=	-lc_pic
  BINDIR= /usr/libexec
  
! .PATH: $(LDDIR) $(LDDIR)/$(MACHINE_ARCH)
  
  $(PROG):
  	$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
--- 1,18 ----
  #	$Id: Makefile,v 1.8 1994/01/28 21:01:20 pk Exp $
  
  PROG=	ld.so
! SRCS=	mdprologue.S rtld.c malloc.c shlib.c etc.c md.c vfprintf.c
  NOMAN=	noman
  LDDIR?= $(.CURDIR)/..
  #PICFLAG=-pic
  PICFLAG=-fpic
! CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE_ARCH) $(PICFLAG) -DRTLD -DLIBC_SCCS -DNO_FLOATING_POINT
  LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic
  ASFLAGS+=-k
  LDADD+=	-lc_pic
  BINDIR= /usr/libexec
  
! .PATH: $(LDDIR) $(LDDIR)/$(MACHINE_ARCH) ${.CURDIR}/../../../../lib/libc/stdio
  
  $(PROG):
  	$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------