Skip to contentSkip to conversation

BSS initialization wrong on ARM??

U-Boot-Users Markus Pietrek 2 participants 2 messages May 4, 2004 – Jun 8, 2004

lore
Share & tools
lore
#0 lore raw

Hi folks,

on the smdk2410 I found out that the BSS segment is initialized at offset 0x4 and not with offset 0x0, leaving the first entry undefined (in my case timer_load_val), at least with gcc-3.3. Cause of pain is arm920t/start.S:clear_bss

clear_bss:
ldr r0, _bss_start /* find start of bss segment */
add r0, r0, #4 /* start at first byte of bss */
ldr r1, _bss_end /* stop here */

I think the add has to be removed. This also seems to be the case on arm720t and arm926ejs.

Bye,

Signature · 4 lines
Markus Pietrek
Kueferstrasse 8, D-79206 Breisach, Germany
FS Forth-Systeme GmbH
Phone: +49 (7667) 908 145,  FAX +49 (7667) 908 245
#1 lore raw

Dear Markus,

Quoted 5 lines · in message <[email protected]> you wrote:

on the smdk2410 I found out that the BSS segment is initialized at offset 0x4 and not with offset 0x0, leaving the first entry undefined (in my case timer_load_val), at least with gcc-3.3. Cause of pain is arm920t/start.S:clear_bss

I think you are right. Thanks for pointing out.

Quoted 7 lines

clear_bss:
ldr r0, _bss_start /* find start of bss segment */
add r0, r0, #4 /* start at first byte of bss */
ldr r1, _bss_end /* stop here */

I think the add has to be removed. This also seems to be the case on arm720t and arm926ejs.

Actually _all_ ARM systems are affected - except s3c44b0 which doesn't clear BSS at all?

Andrea, am I missing something, or is the clear_bss code missing in your port for the s3c44b0 processor?

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Q: What do you get when you cross an ethernet with an income statement?
A: A local area networth.