Subject: Re: _KERNEL cpp symbol in kernel source
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: None <nigel@ind.tansu.com.au>
List: port-mac68k
Date: 07/13/1999 12:40:22
...
> What the gnu linker will do is merge multiple "identical" .bss symbols
> together, and will merge them with one .data symbol. 
> 
> So 100 files can say "struct foo bar" and you'll get exactly one struct
> foo bar in the output binary.

	Aah. OK. GNU ld is being clever, and kernel source programmers
have definately made use of it. Bummer.


> It's kinda like saying "extern struct foo bar" everywhere but without
> having to remember to say "struct foo bar" explicitly in one file.
> 
> Does that help?

	No, but it does explain what's happening ;-)



> I'm not sure how to get Metrowerks to do this... Are there
> linker options?

	I will look, but I doubt there is anything to ignore multiple
global symbol declarations.


> You probably also want to define _LKM so none of the opt_foo.h files get
> included.

	That is helpful. At the moment, I was faking those includes
with empty files of the appropriate name.


	Thanks Bill.

-- 
| Nigel Pearson, nigel@ind.tansu.com.au | "reality  is  that  which  |
|  Telstra IN&IND, Sydney, Australia.   |  doesn't go away when you  |
| Office: 9206 3468    Fax:  9212 6329  |  stop  believing  in  it." |
| Mobile: 0408 664435  Home: 9579 3293  |       Philip K. Dick       |