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)
commit231f714e5441f73394f5c0421bb3f0f83ffd7ad2
treee788406b68fac3f9def8c6b0aef8d215c196fa4e
parent1f7402a14ef90c5dad38483fad33a13fa2218937
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

llvm-svn: 224134
24 files changed:
llvm/test/CMakeLists.txt
llvm/test/lit.cfg
llvm/test/tools/dsymutil/Inputs/basic-lto.macho.x86_64 [new file with mode: 0755]
llvm/test/tools/dsymutil/Inputs/basic-lto.macho.x86_64.o [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/basic.macho.x86_64 [new file with mode: 0755]
llvm/test/tools/dsymutil/Inputs/basic1.c [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/basic1.macho.x86_64.o [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/basic2.c [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/basic2.macho.x86_64.o [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/basic3.c [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/basic3.macho.x86_64.o [new file with mode: 0644]
llvm/test/tools/dsymutil/debug-map-parsing.test [new file with mode: 0644]
llvm/tools/CMakeLists.txt
llvm/tools/LLVMBuild.txt
llvm/tools/Makefile
llvm/tools/dsymutil/CMakeLists.txt [new file with mode: 0644]
llvm/tools/dsymutil/DebugMap.cpp [new file with mode: 0644]
llvm/tools/dsymutil/DebugMap.h [new file with mode: 0644]
llvm/tools/dsymutil/DwarfLinker.cpp [new file with mode: 0644]
llvm/tools/dsymutil/LLVMBuild.txt [new file with mode: 0644]
llvm/tools/dsymutil/MachODebugMapParser.cpp [new file with mode: 0644]
llvm/tools/dsymutil/Makefile [new file with mode: 0644]
llvm/tools/dsymutil/dsymutil.cpp [new file with mode: 0644]
llvm/tools/dsymutil/dsymutil.h [new file with mode: 0644]