« Return to Thread: Local Variable vs Global Variable

Re: Local Variable vs Global Variable

by Enrico Weigelt, metux IT service :: Rate this Message:

Reply to Author | View in Thread

* Robert Cragie <rcc@...> wrote:

> There won't be a .data section as the pointer is now an auto variable and
> will be either a register or on the stack (most likely a register). So there
> is no static variable anymore. The string itself will I presume be stored in
> .rodata - check the output using or32-uclinux-objdump.

BTW: what happens if that global variable is changed to static const char* ?


cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
  http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
        http://patches.metux.de/
---------------------------------------------------------------------
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

 « Return to Thread: Local Variable vs Global Variable