This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARM compiler generating never-used constant data structures
- From: Alexandre Pereira Nunes <alexandre dot nunes at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 5 Feb 2009 10:58:40 -0200
- Subject: Re: ARM compiler generating never-used constant data structures
- References: <20090205120516.64e5b30b@manocska.bendor.com.au>
On Wed, Feb 4, 2009 at 11:05 PM, Zoltán Kócsi <zoltan@bendor.com.au> 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 the ARM generates the same function code, but it
> also generates the image of "things" in the .rodata segment. Twice. Even
> when it stores 12345 separatelly. The code never actually references
> any of them and they are not global thus it is just wasted memory:
>
I think it's relevant to ask this: Are you comparing against the same
gcc release on all the three architectures you mention?