Re: Little saving PATCH

Marcin Dalecki (dalecki@sub994.sub.uni-goettingen.de)
Fri, 30 May 1997 11:47:38 +0200 (MET DST)


On Thu, 29 May 1997, David S. Miller wrote:

> Date: Tue, 27 May 1997 11:49:43 +0200 (MET DST)
> From: Marcin Dalecki <dalecki@sub994.sub.uni-goettingen.de>
>
> OK here it goes...
>
> The following (minimalistic) patch will give You 1.5kByte's on x86 for
> free!! (In case the networking code is disabled...)
> Please include it into the next official kernel release.
>
> Not entirely for free, the patch is incorrect, for example, how does
> dst.o ever get compiled with your patch applied?
>

Mea culpa! Mea magna culpa!

You are entierly right! I forgot to add this object for the case of
netowrek compilation. The main point of the patch is simply that all the
symbols from the objects: dst.o neighbour.o, are never used on a system
compiled with disabled networking facilities.

The patch should read correctly as: (just added dst.o to the compilation
list in case of networked code)

diff -urN linux-2.1.40/net/core/Makefile linux/net/core/Makefile
--- linux-2.1.40/net/core/Makefile Tue Apr 8 11:01:24 1997
+++ linux/net/core/Makefile Tue May 27 11:04:46 1997
@@ -9,8 +9,7 @@

O_TARGET := core.o

-O_OBJS := sock.o skbuff.o iovec.o datagram.o dst.o scm.o \
- neighbour.o
+O_OBJS := sock.o skbuff.o iovec.o datagram.o scm.o

ifeq ($(CONFIG_SYSCTL),y)
O_OBJS += sysctl_net_core.o
@@ -18,7 +17,7 @@

ifdef CONFIG_NET

-O_OBJS += dev.o dev_mcast.o
+O_OBJS += dev.o dev_mcast.o dst.o neighbour.o

ifdef CONFIG_FIREWALL
OX_OBJS += firewall.o