arm: prevent using movt/movw address loads
PATCH 1/1 arm: prevent using movt/movw address loads
Hi, experts:
Quoted 8 lines
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_NCagainst `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,
PATCH 1/1 arm: prevent using movt/movw address loads
Dear TigerLiu at viatech.com.cn,
Quoted 2 lines · In message <[email protected]>…
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
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "What if" is a trademark of Hewlett Packard, so stop using it in your sentences without permission, or risk being sued.
PATCH 1/1 arm: prevent using movt/movw address loads
Hi, Denk:
Quoted 4 lines
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,
PATCH 1/1 arm: prevent using movt/movw address loads
Dear TigerLiu at viatech.com.cn,
Quoted 9 lines · In message <[email protected]>…
Quoted 5 lines
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
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Pig: An animal (Porcus omnivorous) closely allied to the human race by the splendor and vivacity of its appetite, which, however, is in- ferior in scope, for it balks at pig. - Ambrose Bierce