mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-01-18 15:10:07 +00:00
The C runtime requires that uninitialized global variables are zero. In a bare-metal environment, memory contents are undefined at startup and the BSS section is not automatically cleared, so we must zero out this entire section ourselves. Without this, static variables contain garbage values, leading to unpredictable behavior. For example, the simplefb driver uses a static variable to track the current print position, which resulted in text being drawn at random locations on the screen.