[U-Boot-Users] [PATCH] ColdFire: Assign version_string as data section in start.S

Liew Tsi Chung Tsi-chung.Liew at freescale.com
Thu Mar 27 21:32:29 CET 2008


Wolfgang, 

In message
<1206531845-30730-1-git-send-email-Tsi-Chung.Liew at freescale.com> you
wrote:
>> The compiler does not place the .ascii in start.S to data section, 
>> instead it put in under text section. This is an issue where it

> This is intentional on most architectures. What exactly is your
> problem?

Apparently, it is not the case in ColdFire compilers. The ColdFire
compilers always put the version_string in text section if .data is not
declared and shows build error in start.S - "unaligned opcodes detected
in executable segment". The PowerPC compiler, however, will put the
version_string in data section either with or without .data declared.

Unfortunately, I did not catch the error in the previous release (1.3.0
- 1.3.2), and probably based on luck that the u-boot version, date and
time information was always 4-byte align when I retrieved and worked on
the source. Until now, the version, date and time information was not
4-byte align. I agreed with you on previous email after I submitted the
patch "Add brackets to if condition in tools/setlocalversion", there is
nothing wrong with the Linux script.

>> never gets notice and causes error until an update for 
>> tools/setlocalversion has been applied. A label of .data before
.globl 
>> version_string will force to put under data section.

> Can you please explain which exact bug this is supposed to fix?

I am going to re-state the patch to "Fix build error generates by CF
compilers for all CF CPUs" or "Fix version_string not in data section
generates by CF compilers". Will either one of these works for you?

Regards,
TsiChung




More information about the U-Boot mailing list