ld-linux and binary instrumentation

Nix nix@esperi.org.uk
Fri Dec 12 00:52:00 GMT 2008


On 9 Dec 2008, Mike Frysinger told this:
> that's why you'll see crazy ugly macros that look similar to standard C lib 
> functions but really expand straight into system calls.  if you want to keep 
> your sanity, call the kernel directly.  and dont use any dynamic memory.

Well, there *is* a super-minimal malloc() in dl-minimal.c, so you can
pretend that you have dynamic memory. You just have to note that
realloc() only sort of works, free() does nothing, and that it calls
mmap() a lot and thus is hardly high performance.



More information about the Libc-help mailing list