Skip to content

A tool to check for dynamic linking related problems in ELF files

License

Notifications You must be signed in to change notification settings

ftilde/linkcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linkcheck

linkcheck is a tool for detecting problems with dynamic library resolution of elf files. Currently, it opens and performs analysis on all library dependencies of the specified file and checks for:

  • unresolved symbols
  • duplicate symbols
  • missing/conflicting libraries

In contrast to (some versions of) ldd, linkcheck does not execute the binary to be analyzed, so (apart from potentially unrelated undiscovered problems) it should be safe to use on untrusted binaries.

Limitations

The analysis of unresolved and duplicate symbols currently yields a number of false positives, i.e. unresolved and duplicate symbols that are not actually problematic. linkcheck is mostly intended to be used to detect what the problem is if you have a linking related problem in your project.

Building

linkcheck is written in Rust and needs a working installation of cargo to build.

$ git clone https://github.com/ftilde/linkcheck
$ cd linkcheck
$ cargo build --release
$ target/release/linkcheck $PATH_TO_FILE_TO_ANALZE

Usage

$ linkcheck --help
linkcheck 0.1.0
ftilde <[email protected]>
Show potential dynamic linking problems of ELF files.

USAGE:
    linkcheck [FLAGS] [OPTIONS] <file>

FLAGS:
    -f, --full analysis         Perform full analysis (default if neither -u, -d, nor -r are specified)
    -h, --help                  Prints help information
    -d, --duplicate-symbols     Show used duplicate symbols
    -r, --lib-resolution        Show library resolution problems
    -u, --unresolved-symbols    Show unresolved symbols
    -V, --version               Prints version information

OPTIONS:
    -l, --lib <search_methods>...    Library search locations (in order specified). Special options are: rpath, runpath,
                                     ld_library_path, ldconfig:<path_to_ld.so.conf>. All other options are interpreted
                                     as fixed paths to library locations. If nothing is specified, the default
                                     resolution behavior of GNU ld.so is mimicked.

ARGS:
    <file>    ELF file to be analyzed

Examples

Compile the binaries in the examples folder and run linkcheck on them.

Licensing

linkcheck is released under the MIT license.

About

A tool to check for dynamic linking related problems in ELF files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages