Ethereal Wake

Center for the study of the Luminiferous Æther

This website isn’t intended as a font of great cosmic wisdom. It’s merely where I dump the notes from the things I’ve been working on.

C/C++ Runtime Startup

When writing a freestanding application, it’s generally necessary for the firmware engineer to handle runtime initialization. Even when a library like newlib includes a rudimentary implementation of crt0.o, initialization is a very application-specific process owing to the need to initialize hardware, memory, and other loading tasks.

In this essay, we examine the current and historical implementation of executable initialization, finishing with a minimal implementation usable with firmware applications.

Note: Most firmware applications need to address the initialization of .data and .bss from nonvolatile memory. That is not addressed in this essay.

Read More

Read more content in the blog or subscribe via Atom or RSS