wintln!(): teaching an ELF to uwu!!
summary
The prototype inserts itself into the process with a single function call by overwriting the GOT relocation so all write and println output passes through a wrapper that calls the original via a stored pointer. It discovers addresses with gdb and readelf to find offsets, is written in Rust and uses mem::transmute to make a function pointer, and fixes an initial segfault by making the relocation page writable with mprotect the page. The pointaland crate is a minimal working prototype that uwuifies stdout.
AI-written summary · about
chapters (5)
related talks
01h 01mTier 3 Means Getting Your Hands Dirty
25mWild linker: status and plans
04mWriting Hello World in 0x A Presses
33mBeyond println!: Mastering Rust Debugging
26mMoving to modern languages in long-living projects
54mUnwrap()Ing Rust on Embedded Linux
23mLearnable Programming with Rust
32mrustc in userland
