Embedded displays and framebuffers

This post tries to explain the process of drawing picture on a simple display, together with related concepts. Mostly embedded displays and framebuffers are covered, desktop stuff like HDMI and GPUs are out of scope.

Read More

On Application Binary Interface

Some time ago I tried to dive into the topic of ABI (applicaiton binary interface) and it turned out to be surprisingly deep and multi-faceted. This post is a collection of hopefully key points, and just random ABI-related pieces.

Read More

How function backtrace is generated

Let’s walk through a backtrace for a “Hello, world!” program, specifically simpler case with enabled frame pointers. Frame pointer is effectively an optional pointer, pointing to a portion of the stack dedicated to currently executing function. For ARM architecture, it occupies register r11.

Read More

Linux shared library loading walkthrough

This post aims at illustrating loading shared libraries on Linux, specifically running shared library functions. The problem is that compiler can’t know in advance at which address shared library will be loaded, and therefore can’t properly generate function calling code. And the main idea for common solution is that calling .so functions is performed through an intermediary table inside binary ELF file, which is empty at compile-time but is filled with proper values at runtime by dynamic linker.

Read More