Re: Variable order and location within the section - optimization level dependent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 16, 2013 at 7:06 AM, Janáček Jiří <jiri.janacek@xxxxxxxx> wrote:
>
> I do know this approach. I have created sections with the appropriate address ranges and located the variables into those sections by the below mentioned attribute.
> If no optimization is turned on, then the order (means also the address offset of the variable) is correct.
> If -O1 is turned on, the variables order within the section is exactly opposite.
> If -O1 is turned on and the flag -fno-toplevel-reorder is turned on as well, then the order is equal to the requested one. But I would like to apply such a behavior (no reorder) just for some variables in some modules. Other modules should be optimized by -O1 level.
> So I am curious which attributes can define this behavior.

Please don't top-post.  Thanks.

It sounds like you are saying that you want to have your global
variables appear in a specific order in a specific section.

There is no attribute that will make that happen.  Sorry.  The obvious
workaround would be to use a struct.

Ian





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux