[U-Boot-Users] [PATCH] ColdFire: Assign version_string as data section in start.S
Wolfgang Denk
wd at denx.de
Thu Mar 27 23:14:01 CET 2008
In message <4791E710007FEB4BBF83775D787F462F06EAF585 at 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 at 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
--
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
It seems intuitively obvious to me, which means that it might be
wrong. -- Chris Torek
More information about the U-Boot
mailing list