[okl4-developer] Iguana and BSS
Guillaume PETITJEAN
guillaume.petitjean at st.com
Thu Jul 17 01:01:41 EST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
We have a global static variable initialized explicitely to zero in
the application code that is not in the bss section (ZI with RVCT) but
in the data section (RW).
Is it normal ?
Geoffrey Lee wrote:
> On Wed, Jul 16, 2008 at 04:35:34PM +0200, Christian SCHWARZ wrote:
>> Hi Geoffrey,
>>
>
> Hi Christian
>
>> isn't this only true for applications installed into memory by
>> the bootloader ie known at compile time. Anything "later",
>> especially applications loaded during runtime from NV memory or
>> via the internet, will have to be handled by the application
>> installer, ie Iguana or a dedicated app. In this case either the
>> ELF library or (better?) the C library should take care of this
>> at initialization.
>>
>> Did I miss something?
>>
>
> In this case the application loader will have to ensure the .bss
> section is zero'ed, however, in any case, it would be up to the
> application loader rather than the Iguana program to ensure that
> the .bss is in fact zeroed. The C library is not intended to
> provide misc. services such as application loading, hence as such,
> the binary loading library (ELF library if you are using ELF)
> should be responsible for ensuring the .bss is zeroed, since you'd
> have somehow parse and load the binary into memory anyway.
>
>
>> //Christian
>
> -gl
>
>> Geoffrey Lee wrote:
>>> On Wed, Jul 16, 2008 at 03:26:15PM +0200, Guillaume PETITJEAN
>>> wrote:
>>>> Is iguana zeroing the .bss section of the applications on top
>>>> of it ?
>>> Hi Guillaume
>>>
>>> No, the Iguana program does not zero the bss. The ELF
>>> bootloader should do this. Some broken bootloaders can't
>>> handle this properly. In this case specify zero_bss = True
>>> which modifies the ELF file that should force the bss to be
>>> zero'ed when the binary is loaded.
>>>
>>> -gl
>>>
>>>
>>>> Guillaume
>>>>
>>>>
>>>> _______________________________________________ Developer
>>>> mailing list Developer at okl4.org
>>>> https://lists.okl4.org/mailman/listinfo/developer
>>>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIfg1Vjv846okcfKkRAjw4AJwKhkh3v9M8wgS2uTDzRQ31CWUcjwCgrZWx
p5dDDG10U/v/d+TJqRCwRTA=
=Ma2w
-----END PGP SIGNATURE-----
More information about the Developer
mailing list