Skip to content

Instantly share code, notes, and snippets.

View belivenn's full-sized avatar

Johnny belivenn

View GitHub Profile
@deanmlittle
deanmlittle / fib.md
Last active October 3, 2025 12:37
fib.so teardown

Deconstructing fib.so, a minimal sBPF program

For this deconstruction, we will be researching fib.so, a hand-rolled sBPF assembly program that calculates the fibonacci number based upon a u8 input.

Structure of an sBPF program

The structure of an sBPF program has 4 sections:

1. ELF Header

The starting point of the file, describing the overall file format, target environment, and offsets for program and section headers.

2. Program Headers

Define the memory segments and their attributes (readable, writable, executable) for runtime execution.