This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM compiler generating never-used constant data structures


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]