Mehdi Akiki

Posts tagged "rust"

  • Published on

    Investigation · Part 5 of 20 · From source to a running process

    Relocations: The Holes the Compiler Leaves for the Linker

    An object file is full of zero bytes where addresses should be, with a note for each one. I followed these notes through the linker and the loader, computed the filled bytes by hand, and counted the relative relocations that a PIE still needs at startup: 3 in C, 607 in Rust.
  • Published on
    An automaton can recognize a cross-chunk match with little state, yet a streaming API may still need bytes. The missing distinction is recognition state versus output state.
  • Published on

    Investigation · Part 5 of 10 · Types under the hood

    Behavior Without Shape: Traits, Interfaces, and Types That Own No Bytes

    A trait is the behavior half of a type with no shape at all. I measured a type of zero bytes carrying a trait, a million of them in a Vec with zero allocations, and a door that cannot be walked through while closed, all with nothing left in the binary. This is the kind of type I think most code does not use enough.