Date: Sat, 19 Sep 1998 11:43:13 -0700 From: John Polstra <jdp@polstra.com> To: Peter Wemm <peter@netplex.com.au> Cc: joki@kuebart.stuttgart.netsurf.de, current@FreeBSD.ORG Subject: Re: Correct names for C globals in kernel Message-ID: <199809191843.LAA01747@austin.polstra.com> In-Reply-To: Your message of "Sun, 20 Sep 1998 02:36:12 %2B0800." <199809191836.CAA14684@spinner.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809191843.LAA01747>