Skip to content

opalmirror1/lddgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

lddgraph - convert shared object dependencies into a directed graph

SYNOPSIS

   lddgraph <dynamically-loadable-file> | dot -Tpng > g.png; eog g.png
   lddgraph <ldd-output-file> | dot -Tpng > g.png; eog g.png
   cat <ldd-output-file> | lddgraph - | dot -Tpng > g.png; eog g.png

DECRIPTION

Examine the dynamically loaded executable or shared object file given as an argument, or the output of running ldd -v in a file argument or stdin (with - argument), and emit a graphviz directed graph DOT file on stdout.

The output DOT file may be passed to the 'dot' command to plot it into a displayable format.

ld.so (the Linux ELF loader) will load and relocate every node of the output graph -- all the objects listed at the top of the ldd -v output.

Solid lines are the versioned symbol requirement dependencies.

Dotted lines are direct loader dependencies that weren't pulled in by the more-explicit versioned symbol dependencies.

OPTIONS

   -    read ldd -v output on stdin 
   -?   provide help message

EXAMPLES

The following:

   ./lddgraph lddgraph | dot -Tpng -Gsize="800,600" \
      -Nfontsize=10 -Efontsize=8 > img/lddgraph.png

Produces output like this:

lddgraph graphs itself

   lddgraph /bin/bash | dot -Tpng > g.png && eog g.png
   lddgraph /usr/lib/libgdal.so | dot -Tpng > g.png; eog g.png
   ldd -v /bin/uname | lddgraph - | dot -Tpng > g.png; eog g.png

BUGS

Same issues as ldd has.

SEE ALSO

ld.so(8), ldconfig(8), ldd(8), dot(1), graphviz(7)

COMPILE WITH

c++ -std=c++98 -o lddgraph lddgraph.cpp

AUTHOR

James Perkins, 19 April 2021

LICENSE

MIT

About

lddgraph - convert shared object dependencies into a directed graph

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors