
In message 4791E710007FEB4BBF83775D787F462F06EAF585@az33exm22.fsl.freescale.net you wrote:
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.
No, that's not correct. See for example here:
"cpu/mpc8xx/start.S":
85 .text 86 .long 0x27051956 /* U-Boot Magic Number */ 87 .globl version_string 88 version_string: 89 .ascii U_BOOT_VERSION 90 .ascii " (", __DATE__, " - ", __TIME__, ")" 91 .ascii CONFIG_IDENT_STRING, "\0" 92 93 . = EXC_OFF_SYS_RESET 94 .globl _start 95 _start: 96 lis r3, CFG_IMMR@h /* position IMMR */ ...
Here we explicitely (and intentionally) place the version string in the text segment. It will NOT be put in the data segment.
Maybe just adding some ".align" directive helps?
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?
I would like to understand the problem first. I feel you might just be missing some alignment... It has been working so far, hasn't it?
Best regards,
Wolfgang Denk