Date: Sun, 3 Dec 1995 15:03:16 +1100 (EST) From: michael butler <imb@scgt.oz.au> To: julian@ref.tfs.com (Julian Elischer) Cc: current@freebsd.org Subject: Re: changes in -current..TEST please Message-ID: <199512030403.PAA20533@asstdc.scgt.oz.au> In-Reply-To: <199512010631.WAA15110@ref.tfs.com> from "Julian Elischer" at Nov 30, 95 10:31:01 pm
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512030403.PAA20533>