Giter Club home page Giter Club logo

Comments (5)

facundominguez avatar facundominguez commented on May 25, 2024

The most practical option seems to be using a combination of ldd to get the paths of all dependencies and objdump to traverse the dependency tree of the binary, skipping the excluded libraries.

Some other options that I've considered follow.


Write a program which finds the libraries with objdump and follows the dependencies instead of using ldd. /sbin/ldconf -p and the RPATH provide the list of folders in which to search.

The downside is that we have to keep this tool adjusted to the specifics of each platform were clodl is used. An advantage is that we can possibly build the closure of cross-compiled binaries with this approach.


Another option is to use lddtree from pax-utils, to distinguish between direct and transitive dependencies. Unfortunately, lddtree produces several megabytes of output which takes a while to produce and consume.

from clodl.

mboes avatar mboes commented on May 25, 2024

Using scanelf -qn (from pax-utils) is an option. It's what lddtree uses under the hood.

from clodl.

facundominguez avatar facundominguez commented on May 25, 2024

Yeah, tried that. It provides the same info as objdump -p | grep NEEDED. Could use it in combination with ldd instead of objdump maybe.

from clodl.

facundominguez avatar facundominguez commented on May 25, 2024

Work in progress: master...fd/deptree-walk

from clodl.

facundominguez avatar facundominguez commented on May 25, 2024

Merged in e9f1339.

from clodl.

Related Issues (20)

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.