On Fri, 20 Apr 2007 23:55:48 +0200 Roland Mainz wrote:
> Glenn Fowler wrote:
> [CC:'ing some (random) compiler people and the linker alien (rod) to
> take a look at this issue]
> > I've been at this so long you think I should know better
> > 
> > I've been under the apparently mistaken assumption that
> > if I dilligently pepper struct definitions and subsequent
> > declarations and initializations with "const" that the compiler
> > will attempt to place that data in readonly text
> > 
> > I've done this with the libast tables in conftab.c lc.c
> > but nm and size show the data going to the .data section

> Was this a read/write or read-only data section ? IMO |const| data
> should go into a read-only section but I am not sure whether they are
> labelled "data" or "text" in that case.

".data" => read/write, the cc I tested had .rodata for readonly


Reply via email to