From owner-freebsd-current Sat Dec 2 20:09:00 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA16294 for current-outgoing; Sat, 2 Dec 1995 20:09:00 -0800 Received: from asstdc.scgt.oz.au (root@asstdc.scgt.oz.au [202.14.234.65]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id UAA16261 for ; Sat, 2 Dec 1995 20:08:38 -0800 Received: (from imb@localhost) by asstdc.scgt.oz.au (8.6.12/BSD-4.4) id PAA20533; Sun, 3 Dec 1995 15:03:17 +1100 From: michael butler Message-Id: <199512030403.PAA20533@asstdc.scgt.oz.au> Subject: Re: changes in -current..TEST please To: julian@ref.tfs.com (Julian Elischer) Date: Sun, 3 Dec 1995 15:03:16 +1100 (EST) Cc: current@freebsd.org In-Reply-To: <199512010631.WAA15110@ref.tfs.com> from "Julian Elischer" at Nov 30, 95 10:31:01 pm X-Mailer: ELM [version 2.4 PL24beta] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1103 Sender: owner-current@freebsd.org Precedence: bulk Julian Elischer writes: > > > loading kernel > > > kern_xxx.o: Undefined symbol `_dummy_cleanup' referenced > > > *** Error code 1 [ .. ] > ok I just compiled your kernel... > > cc -O -W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested-externs -nostdinc -I. -I../.. -I../../sys -I/usr/include -DI386_CPU -DPCVT_FREEBSD=210 -DSYSVMSG -DSYSVSEM -DSYSVSHM -DUCONSOLE -DBOUNCE_BUFFERS -DSCSI_DELAY=15 -DCOMPAT_43 -DPROCFS -DMSDOSFS -DFFS -DINET -DMATH_EMULATE -DJREMOD -DKERNEL -c vers.c > loading kernel > rearranging symbols > text data bss dec hex > 647168 53248 65684 766100 bb094 GCC, at optimisation levels > 1, will remove data (and code) which it considers to be unreferenced. _dummy_cleanup is declared 'static' yet is unreferenced in the file in which it appears. Given that 'static' implies 'local to this file', this is valid behaviour. However, since the variable in question really is intended to be used by things external to kern_xxx.c, perhaps it should not be declared 'static' and GCC will leave it alone at all optimisation settings .. michael