Date: Sun, 3 Dec 1995 18:47:38 +1100 From: Bruce Evans <bde@zeta.org.au> To: imb@scgt.oz.au, julian@ref.tfs.com Cc: current@freebsd.org Subject: Re: changes in -current..TEST please Message-ID: <199512030747.SAA15385@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> > > loading kernel >> > > kern_xxx.o: Undefined symbol `_dummy_cleanup' referenced >> > > *** Error code 1 >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 Actually, gcc, at optimization levels > 2 or if -finline-functions is used, turns static functions into static inline functions. In all cases except when -fkeep-inline-functions is used, if a static inline function is simple enough to be integrated into its callers, the code for the function is not output separately. dummy_cleanup() is simple enough to integrate into anything so it gets deleted. >'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 .. Perhaps the unsupported -O3 shouldn't be used. Many things that can reasonably be inlined already are. Excessive inlining can slow things down (even for functions that are only referenced once, inlining sometimes makes their callers too hard to optimize). How much slower was -O3? :-) Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512030747.SAA15385>