CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2013/06/01 03:57:58

Modified files:
        libexec/ld.so  : Makefile loader.c resolve.c resolve.h 
        libexec/ld.so/alpha: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/amd64: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/arm: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/hppa: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/i386: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/m68k: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/m88k: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/mips64: rtld_machine.c syscall.h 
        libexec/ld.so/powerpc: rtld_machine.c syscall.h 
        libexec/ld.so/sh: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/sparc: ldasm.S rtld_machine.c syscall.h 
        libexec/ld.so/sparc64: ldasm.S rtld_machine.c syscall.h 
        usr.bin/ktrace : Makefile ktrace.c 
Added files:
        libexec/ld.so  : trace.c 
        usr.bin/ktrace : ltrace.1 

Log message:
Introduce ltrace(1). This tool works with ld.so to inject utrace record for
each plt call, allowing to trace a binary linked against shared library at the
public function call level.

To do so, ltrace(1) sets up some environment variables to enable plt tracing
in ld.so, and invokes ktrace(2) for utrace events. ld.so will force lazy
binding and will send an utrace record in the plt resolver, without updating
the plt.

Minimal filtering capabilities are provided, inspired by Solaris' truss -u,
to limit tracing to libraries and/or symbol names. Non-traced libraries and
symbols will have the regular resolver processing, with the expected plt
update.

"Get it in" deraadt

Reply via email to