#dwarf #split-dwarf #dwarf-package #dwarf-object #dwp

app thorin-dwp-bin

Merge DWARF objects and packages into DWARF packages

6 releases (breaking)

0.5.0 Feb 22, 2023
0.4.0 Jan 9, 2023
0.3.0 Jul 14, 2022
0.2.0 Jan 18, 2022
0.1.1 Dec 18, 2021

#126 in Debugging

Download history 7/week @ 2022-11-23 1/week @ 2022-11-30 1/week @ 2022-12-07 1/week @ 2022-12-14 4/week @ 2022-12-21 1/week @ 2022-12-28 19/week @ 2023-01-04 15/week @ 2023-01-11 12/week @ 2023-01-18 6/week @ 2023-01-25 12/week @ 2023-02-01 30/week @ 2023-02-08 29/week @ 2023-02-15 26/week @ 2023-02-22 2/week @ 2023-03-08

57 downloads per month




thorin is an DWARF packaging utility for creating DWARF packages (*.dwp files) out of input DWARF objects (*.dwo files; or *.o files with .dwo sections), supporting both the pre-standard GNU extension format for DWARF packages and the standardized format introduced in DWARF 5.

thorin was written as part of the implementation of Split DWARF in rustc. A Rust implementation of a DWARF packaging utility is easier to integrate into the compiler and can support features like loading dwarf objects from archive files (or rustc's rlibs) which are helpful in supporting cross-crate Split DWARF packaging in rustc.


thorin can read input DWARF objects from executables or can package arbitrary input dwarf objects (including DWARF objects in archive files, such as Rust rlibs)! Install thorin using cargo:

$ cargo install thorin-dwp-bin
$ thorin --help
thorin 0.5.0
merge dwarf objects into dwarf packages

    thorin [OPTIONS] [--] [inputs]...

    -h, --help       Prints help information
    -V, --version    Prints version information

    -e, --exec <executables>...    Specify path to executables to read list of dwarf objects from
    -o, --output <output>          Specify path to write the dwarf package to [default: -]

    <inputs>...    Specify path to input dwarf objects and packages

If the input objects are of DWARF version 5 or greater, then the output package will be in DWARF 5 format. For version 4 and below, the GNU Extension format will be used for the output package.


thorin's command-line interface is intended to be stable and have limited breaking changes.


thorin is named after Thorin Oakenshield from The Hobbit, as Thorin is a dwarf who leads other dwarves. thorin uses the gimli library (named after a dwarf from Lord of the Rings) to read DWARF format debug information, the name of which is a medieval fantasy complement to ELF, the file format for executables and object files.
You could also call this project rust-dwp, if you'd prefer that.

Author and acknowledgements

thorin is authored by David Wood of Huawei Technologies Research & Development (UK) Ltd. thorin is maintained by the Rust Compiler Team.
In addition, thanks to the authors of object and gimli, on which this utility depends heavily; and to Philip Craig for advice and reviews during initial implementation of thorin.


Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Code of conduct

When contributing or interacting with this project, we ask abide the Rust Code of Conduct and ask that you do too.


~652K SLoC