ndk-depends 查看库依赖

作者: 千浪 | 来源:发表于2019-12-19 17:24 被阅读0次

    ndk-depends命令

    这个命令位于NDK 软件包的根目录,用于查看so之间的依赖关系。

    Usage: ndk-depends [options] <elf-file>
    
    This program is used to print the dependencies of a given ELF
    binary (shared library or executable). It supports any architecture,
    endianess and bitness.
    
    By default, all dependencies are printed in topological order,
    which means that each item always appear before other items
    it depends on. Except in case of circular dependencies, which will
    print a warning to stderr.
    
    The tool will try to find other libraries in the same directory
    as the input ELF file. It is possible however to provide
    additional search paths with the -L<path>, which adds an explicit path
    or --host-libs which adds host-specific library paths, on ELF-based systems
    only.
    
    Use --print-paths to print the path of each ELF binary.
    
    Use --print-direct to only print the direct dependencies
    of the input ELF binary. All other options except --verbose will be ignored.
    
    Use --print-java to print a Java source fragment that loads the
    libraries with System.loadLibrary() in the correct order. This can
    be useful when copied into your application's Java source code.
    
    Use --print-dot to print the dependency graph as a .dot file that can be
    parsed by the GraphViz tool. For example, to generate a PNG image of the
    graph, use something like:
    
      ndk-depends /path/to/libfoo.so --print-dot | dot -Tpng -o /tmp/graph.png
    
    The --verbose option prints debugging information, which can be useful
    to diagnose problems with malformed ELF binaries.
    
    Valid options:
      --help|-h|-?    Print this message.
      --verbose       Increase verbosity.
      --print-direct  Only print direct dependencies.
      -L<path>        Append <path> to the library search path.
      --host-libs     Append host library search path.
      --print-paths   Print full paths of all libraries.
      --print-java    Print Java library load sequence.
      --print-dot     Print the dependency graph as a Graphviz .dot file.
    

    相关文章

      网友评论

        本文标题:ndk-depends 查看库依赖

        本文链接:https://www.haomeiwen.com/subject/reyvcqtx.html