Mehdi Akiki

Posts tagged "rust"

  • Published on

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

    How LD_PRELOAD Replaces a Function Without Recompiling

    I wrote a small library that counts malloc calls and preloaded it into C, Rust and ls. The famous dlsym trap did not appear with glibc 2.43, but ls hid my output in a way I did not expect, and the static binary ignored the library completely.
  • Published on

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

    How a Call to printf Finds printf: The PLT and the GOT

    I watched one GOT slot in gdb before and after the first call to puts, measured what lazy binding costs on that first call, and compared it with -z now, LD_BIND_NOW, -fno-plt and a Rust binary that never uses the PLT for libc.
  • Published on
    Rust 1.97 made v0 symbol mangling the stable default. Compare real nm output, read the encoding, and know what changes for profilers, debuggers, and ABI boundaries.
  • Published on

    Investigation · Part 8 of 20 · What survives a crash

    An Append-Only Log That Survives a Torn Last Record

    A log of length, CRC-32 and payload, and a recovery that stops at the first bad record. I tested it with kill -9, with my crash simulator and with a fuzzer that cuts the file at every byte. One small format detail decided if 17 records came back as 17 or as 529.