Initial dsymutil tool commit.
authorFrederic Riss <friss@apple.com>
Fri, 12 Dec 2014 17:31:24 +0000 (17:31 +0000)
committerFrederic Riss <friss@apple.com>
Fri, 12 Dec 2014 17:31:24 +0000 (17:31 +0000)
commit31e081ed96228d31f7674557ebac52b5954aff50
tree089d4c5b0153440dbb309ab06cd09d0a4584a8af
parent00b3170e707b34a4e1fa65715e3c5ccc90cb954f
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@224134 91177308-0d34-0410-b5e6-96231b3b80d8
24 files changed:
test/CMakeLists.txt
test/lit.cfg
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/LLVMBuild.txt [new file with mode: 0644]
tools/dsymutil/MachODebugMapParser.cpp [new file with mode: 0644]
tools/dsymutil/Makefile [new file with mode: 0644]
tools/dsymutil/dsymutil.cpp [new file with mode: 0644]
tools/dsymutil/dsymutil.h [new file with mode: 0644]