Re: [U-Boot] [PATCH] arm: prevent using movt/movw address loads

Hi, experts:
The movt/movw instruction can be used to hardcode an memory location in the instruction itself. The linker starts complaining about this if the compiler decides to do so: "relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used" and it is not support by U-boot as well. Prevent their use by requiring word relocations. This allows u-boot to be build at other optimalization levels then -Os.
Would this patch be included in 2013.10 release verion? So u-boot could be built at other optimalization levels than -Os.
I tested 2013.10-rc2, but still failed to build by -O0 / -O1 etc.
Best wishes,

Dear TigerLiu@viatech.com.cn,
In message FE7ADED5C2218B4786C09CD97DC4C49FA88EC1@exchbj02.viatech.com.bj you wrote:
I tested 2013.10-rc2, but still failed to build by -O0 / -O1 etc.
May I ask why you want to use other optimization levels? Do you just hope that your code may run faster, or do you have actual proof (i. e. measurements) that this is the case? It would be interesting if you could share any such measured results.
Best regards,
Wolfgang Denk

Hi, Denk:
May I ask why you want to use other optimization levels? Do you just hope that your code may run faster, or do you have actual proof (i. e. measurements) that this is the case? It would be interesting if you could share any such measured results.
Not for running faster. I just think: If turn off compiler optimization, some bugs would be analysed easily.
Best wishes,

Dear TigerLiu@viatech.com.cn,
In message FE7ADED5C2218B4786C09CD97DC4C49FA88EDF@exchbj02.viatech.com.bj you wrote:
May I ask why you want to use other optimization levels? Do you just hope that your code may run faster, or do you have actual proof (i. e. measurements) that this is the case? It would be interesting if you could share any such measured results.
Not for running faster. I just think: If turn off compiler optimization, some bugs would be analysed easily.
Hm... that does not match my experience. A pretty large percentage of actual bugs is of Heisenbug nature. Changin the buil environment will create a completely different image with different behaviour - you may be lucky, but too often the changes actually side-track you from the actual issues.
Best regards,
Wolfgang Denk
participants (2)
-
TigerLiuļ¼ viatech.com.cn
-
Wolfgang Denk