GithubHelp home page GithubHelp logo

elftree's Introduction

ELF tree

Show library dependency of an ELF binary in a tree form. It supports folding and expanding subtree and shows related information.

screenshot

Usage

$ elftree
Usage: elftree [<options>] <executable>

$ elftree -h
Usage of elftree:
  -p	Show library path
  -stdio
	Show it on standard IO
  -tui
	Show it with TUI (default true)
  -v	Show binary info

$ elftree -stdio `which firefox`
firefox
   libpthread.so.0
      libc.so.6
         ld-linux-x86-64.so.2
      ld-linux-x86-64.so.2
   libdl.so.2
      libc.so.6
      ld-linux-x86-64.so.2
   libstdc++.so.6
      libm.so.6
         libc.so.6
         ld-linux-x86-64.so.2
      libc.so.6
      ld-linux-x86-64.so.2
      libgcc_s.so.1
         libc.so.6
   libm.so.6
   libgcc_s.so.1
   libc.so.6
   ld-linux-x86-64.so.2

TUI keys

  • f: file header view
  • s: section header view
  • d: dynamic info view
  • y: symbol view
  • ENTER: toggle folding
  • TAB: switch window
  • q: quit

How to install

If you have golang environment setup:

$ go get github.com/namhyung/elftree

Or, just download the binary:

$ wget https://github.com/namhyung/elftree/releases/download/v0.1/elftree-linux-amd64
$ sudo install -D elftree-linux-amd64 /usr/local/bin/elftree

elftree's People

Contributors

namhyung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

elftree's Issues

When modules cannot be found...

...elftree sadly only returns the name of very first missing one and exits,
without reiterating / resolving the rest ones.
Example, say with the QT4-based version of v4l2ucp:

elftree ./v4l2ucp 
open : no such file or directory:  (libQtGui.so.4)
ldd ./v4l2ucp 
	linux-vdso.so.1 =>  (0x00007fff73d5f000)
	libQtGui.so.4 => not found
	libQtCore.so.4 => not found
	libv4l2.so.0 => /usr/lib/x86_64-linux-gnu/libv4l2.so.0 (0x00007feaa1893000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007feaa1511000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007feaa12fb000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feaa0f31000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007feaa0d14000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007feaa0b10000)
	libv4lconvert.so.0 => /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0 (0x00007feaa0895000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007feaa058c000)
	/lib64/ld-linux-x86-64.so.2 (0x00007feaa1cc4000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007feaa0384000)
	libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007feaa012b000)

Alternatives to ldd like eg. lddsafe & lddtree (objdump & readelf based),
also report the rest of the (either existing or not found) deps.

elftree's dual stdio / tui mode however is the bee's knees obviously,
hence it would be really really nice if you ever felt like having a look at it...

All the best

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.