
Dear Thomas Weber,
In message 1291046912-15167-1-git-send-email-weber@corscience.de you wrote:
This patch fixes the bss usage in ARMv7/omap-common/timer.c
The .bss section cannot be used before the relocation, because this section is overlayed with .rel.dyn section.
No, this is not correct. It cannot be used because it simply has not been created at all. The overlay thing is just an optimization to shring the image size, but otherwise it has no influence here. The thing is that before relocation we simply do not have a full standard conforming C runtime environment: we havce only a very small stack, we have a read-only data segment and no bss at all.
-static ulong timestamp; -static ulong lastinc; +static ulong timestamp = 0; +static ulong lastinc = 0;
This does not change anything. The compiler still generates exactly the same code.
- reset_timer_masked(); /* init the timestamp and lastinc value */
And this is most probably wrong.
Best regards,
Wolfgang Denk