Re: ARM compiler generating never-used constant data structures

2009-02-05 Thread Daniel Jacobowitz
On Fri, Feb 06, 2009 at 12:30:13AM +1100, Zoltán Kócsi wrote: > Almost the same: > > x86_64: 4.0.2 > AVR:4.0.1 > ARM:4.0.2 > > So, at least the Intel and the ARM are the same yet the Intel version > omits the .rodata, the ARM keeps it. I'll check it with the newer > version next wee

Re: ARM compiler generating never-used constant data structures

2009-02-05 Thread Zoltán Kócsi
On Thu, 5 Feb 2009 10:58:40 -0200 Alexandre Pereira Nunes wrote: > On Wed, Feb 4, 2009 at 11:05 PM, Zoltán Kócsi > wrote: [cut] > > > > If I compile the above with -O2 or -Os, then if the target is AVR or > > x86_64 then the result is what I expected, func() just loads 3 or > > 12345 then return

Re: ARM compiler generating never-used constant data structures

2009-02-05 Thread Alexandre Pereira Nunes
On Wed, Feb 4, 2009 at 11:05 PM, Zoltán Kócsi wrote: [cut] > > If I compile the above with -O2 or -Os, then if the target is AVR or > x86_64 then the result is what I expected, func() just loads 3 or 12345 > then returns and that's all. There is no .rodata generated. > > However, compiling for th

ARM compiler generating never-used constant data structures

2009-02-04 Thread Zoltán Kócsi
I have various constants. If I define them in a header file like this: static const int my_thing_a = 3; static const int my_thing_b = 12345; then everything is nice, if I use them the compiler knows their value and uses them as literals and it doesn't actually put them into the .rodata section (w