Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gandro/rust-ld-preload-example


https://github.com/gandro/rust-ld-preload-example

Last synced: 27 days ago
JSON representation

Awesome Lists containing this project

README

        

# Example: `LD_PRELOAD` with Rust

# build a Rust cdylib which hijacks call to `puts`
$ cargo build --release

# a example C program
$ gcc hello.c -o hello
$ ./hello
Hello there, C is awesome!

# use LD_PRELOAD
$ LD_PRELOAD=./target/release/libpreload.so ./hello
Hello there, Rust is awesome!