Initial dsymutil tool commit.
authorFrederic Riss <friss@apple.com>
Tue, 9 Dec 2014 17:03:30 +0000 (17:03 +0000)
committerFrederic Riss <friss@apple.com>
Tue, 9 Dec 2014 17:03:30 +0000 (17:03 +0000)
commit08550bc7516c5d52bf4c6b2c30d962d7de47ded7
tree9d651fc95f7a4cd69e6a064c38f5f424570968a2
parent44603b67b1d1def1d03823991677bcc795b83ab5
Initial dsymutil tool commit.

The goal of this tool is to replicate Darwin's dsymutil functionality
based on LLVM. dsymutil is a DWARF linker. Darwin's linker (ld64) does
not link the debug information, it leaves it in the object files in
relocatable form, but embbeds a `debug map` into the executable that
describes where to find the debug information and how to relocate it.
When releasing/archiving a binary, dsymutil is called to link all the DWARF
information into a `dsym bundle` that can distributed/stored along with
the binary.

With this commit, the LLVM based dsymutil is just able to parse the STABS
debug maps embedded by ld64 in linked binaries (and not all of them, for
example archives aren't supported yet).

Note that the tool directory is called dsymutil, but the executable is
currently called llvm-dsymutil. This discrepancy will disappear once the
tool will be feature complete. At this point the executable will be renamed
to dsymutil, but until then you do not want it to override the system one.

    Differential Revision: http://reviews.llvm.org/D6242

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223793 91177308-0d34-0410-b5e6-96231b3b80d8
23 files changed:
test/tools/dsymutil/Inputs/basic-lto.macho.x86_64 [new file with mode: 0755]
test/tools/dsymutil/Inputs/basic-lto.macho.x86_64.o [new file with mode: 0644]
test/tools/dsymutil/Inputs/basic.macho.x86_64 [new file with mode: 0755]
test/tools/dsymutil/Inputs/basic1.c [new file with mode: 0644]
test/tools/dsymutil/Inputs/basic1.macho.x86_64.o [new file with mode: 0644]
test/tools/dsymutil/Inputs/basic2.c [new file with mode: 0644]
test/tools/dsymutil/Inputs/basic2.macho.x86_64.o [new file with mode: 0644]
test/tools/dsymutil/Inputs/basic3.c [new file with mode: 0644]
test/tools/dsymutil/Inputs/basic3.macho.x86_64.o [new file with mode: 0644]
test/tools/dsymutil/debug-map-parsing.test [new file with mode: 0644]
tools/CMakeLists.txt
tools/LLVMBuild.txt
tools/Makefile
tools/dsymutil/CMakeLists.txt [new file with mode: 0644]
tools/dsymutil/DebugMap.cpp [new file with mode: 0644]
tools/dsymutil/DebugMap.h [new file with mode: 0644]
tools/dsymutil/DwarfLinker.cpp [new file with mode: 0644]
tools/dsymutil/DwarfLinker.h [new file with mode: 0644]
tools/dsymutil/LLVMBuild.txt [new file with mode: 0644]
tools/dsymutil/MachODebugMapParser.cpp [new file with mode: 0644]
tools/dsymutil/MachODebugMapParser.h [new file with mode: 0644]
tools/dsymutil/Makefile [new file with mode: 0644]
tools/dsymutil/dsymutil.cpp [new file with mode: 0644]