From owner-freebsd-current Sat Sep 19 11:44:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA04985 for freebsd-current-outgoing; Sat, 19 Sep 1998 11:44:13 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA04907 for ; Sat, 19 Sep 1998 11:44:06 -0700 (PDT) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id LAA01747; Sat, 19 Sep 1998 11:43:14 -0700 (PDT) (envelope-from jdp) Message-Id: <199809191843.LAA01747@austin.polstra.com> To: Peter Wemm cc: joki@kuebart.stuttgart.netsurf.de, current@FreeBSD.ORG Subject: Re: Correct names for C globals in kernel In-reply-to: Your message of "Sun, 20 Sep 1998 02:36:12 +0800." <199809191836.CAA14684@spinner.netplex.com.au> Date: Sat, 19 Sep 1998 11:43:13 -0700 From: John Polstra Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Also, one could use the -munderscores flag for gcc on the kernel and > skip asnames.h altogether until it's elf-only (and then convert the > symbols and drop the compile flag). > > Yes, you can have gcc's underscore prefixing is independent of > the binary format. You can have -mno-underscores with a.out or > -munderscores with elf if you wish. If we're going to transition to > elf as default for the 3.0 kernel, we could convert the source now, > and add -mno-underscores to the a.out kernel cc flags. I don't want to change it that way at least until 3.0 is out. What we have now works, and using -mno-underscores could easily create multiply defined symbols if assembly language code assumes (as much of it does) that an unprefixed global name is hidden from C. Bruce and I had a long discussion about it a year ago or more. We decided that the leading underscore is a useful reminder that the symbol is a C symbol. If it discourages the use of assembly language, so much the better. :-) John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message