[U-Boot-Users] u-boot BOOTELF clearing SHT_NOBITS sections

Baruch Cochavy Baruch at asocstech.com
Sun May 4 08:25:34 CEST 2008


Hi,

 

u-boot's bootelf clears (memset to 0) sections of SHT_NOBITS type. This
covers .bss sections - however, it might also includes other sections,
not expected to be cleared as per some users expectations (stacks, for
example).

 

I am beginning to wonder if this behavior is correct/desired: if one
tries to bootelf an ELF file which happens to resizde somewhere inside
the .bss section, or some other data section of the loaded code, bootelf
clears it (or part of it...) while loading, corrupting the code to be
loaded.

 

AFAIK, .bss is normally zeroed out in crt0 (or equivalent), so there is
no need (?) to zero it in bootelf. Bootelf may also defer all such
actions (clearing section) to the end of the loading process.

 

Please feel free to correct me I I am wrong...

 

Thanks,

  Baruch Cochavy

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080504/3520cb1f/attachment.htm 


More information about the U-Boot mailing list