From owner-freebsd-current Sun Dec 3 14:07:35 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id OAA27607 for current-outgoing; Sun, 3 Dec 1995 14:07:35 -0800 Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id OAA27602 for ; Sun, 3 Dec 1995 14:07:27 -0800 Received: (from julian@localhost) by ref.tfs.com (8.6.12/8.6.9) id OAA00238; Sun, 3 Dec 1995 14:06:58 -0800 From: Julian Elischer Message-Id: <199512032206.OAA00238@ref.tfs.com> Subject: Re: changes in -current..TEST please To: terry@lambert.org (Terry Lambert) Date: Sun, 3 Dec 1995 14:06:58 -0800 (PST) Cc: imb@scgt.oz.au, current@FreeBSD.org In-Reply-To: <199512032054.NAA09061@phaeton.artisoft.com> from "Terry Lambert" at Dec 3, 95 01:54:41 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1230 Sender: owner-current@FreeBSD.org Precedence: bulk > > > 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 .. > > How is dummy_cleanup "not referenced"? > > phaeton: {50} grep dummy_cleanup *.c > kern_xxx.c:dummy_cleanup() {} > kern_xxx.c:TEXT_SET(cleanup_set, dummy_cleanup); poul, examine what a TEXT_SET is..... it's an asm directive from memory, as it is actually really a hint to the linker.. of course gcc doen't know about it.. (If I recall correctly) > > Looks referenced to me. > > I think GCC is doing bogus things. > > Is it also removing "cleanup_set"? That would be so incredibly bogus > as to cause all C++ and most of the FreeBSD kernel to fail miserably. > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. >