From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Date: Fri, 23 Jan 2009 21:50:57 +1100 > On Fri, 23 Jan 2009 21:39:27 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote: > > > > Hi again, > > > > On Fri, 23 Jan 2009 21:21:28 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote: > > > > > > So, this could be a compiler bug? > > > > We pass -fno-common to gcc which seems to cause the (non-extern) const > > variable to end up in the bss. > > -fno-common > In C, allocate even uninitialized global variables in the data > section of the object file, rather than generating them as common > blocks. This has the effect that if the same variable is declared > (without "extern") in two different compilations, you will get an > error when you link them. The only reason this might be useful is > if you wish to verify that the program will work on other systems > which always work this way. > > I don't know why we use this, but it seems to basically make using > "extern" on variables in header files compulsory. But it seems to be > moving the variable from *COM* to .bss rather than to .{ro}data as I would > expect from the description above. > > Oh, well, easy to work around. Thanks for testing, it confirms my suspicions :-) I'll check in the fix. -- To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html