From owner-freebsd-current Tue Dec 19 23:16:23 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA03437 for current-outgoing; Tue, 19 Dec 1995 23:16:23 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id XAA03428 for ; Tue, 19 Dec 1995 23:16:14 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id SAA21287; Wed, 20 Dec 1995 18:15:48 +1100 Date: Wed, 20 Dec 1995 18:15:48 +1100 From: Bruce Evans Message-Id: <199512200715.SAA21287@godzilla.zeta.org.au> To: current@freebsd.org, nate@rocky.sri.MT.net Subject: Re: Mis-feature in -current Sender: owner-current@freebsd.org Precedence: bulk >This one was a strange one, but I finally figured it out. I'm trying to >build kernels which contain all of the necessary 'debug' symbols in >them, so I'm not compiling the code with '-O'. Kernels compiled with any level of optimization (and -g) should contain all the necessary debug symbols. >However, I've noticed that if you don't compile the code with '-O', gcc >no longer optimizes out the calls to strlen. What this means is that >the kernel will no longer link if you compile any modules which uses >strlen(). I found another interesting case related to this. ipx_input() uses an inefficient auto initializer for ipx_ipx. gcc-2.7.0 makes a static copy of the initial data and copies it to the variable a word at a time, but gcc-2.7.2 pessimizes the initialization to two assignments and a memset call. Linking fails because memset isn't in the library. Bruce