Stream: t-compiler

Topic: statics and BSS


Jake Goulding (Jun 15 2019 at 19:48, on Zulip):

If I declare a mutable static:

static mut TX_WAKER: Option<Waker> = None;

This seems to be placed in BSS:

00800221 l     O .bss   00000004 _ZN5blink3fut8TX_WAKER17h8714705085b6d300E

I assume that means it needs to be zeroed out when I load in myself in AVR land?

nagisa (Jun 15 2019 at 23:46, on Zulip):

Yes, it is usually the responsibility of the code itself to zero out the .bss section in embedded land

nagisa (Jun 15 2019 at 23:46, on Zulip):

It is often done by whatever thin supporting libraries you may have – the ARM thumb implements this code in their device libraries, for example

Last update: Nov 20 2019 at 02:00UTC