From 401e4e570e1e323484018b9ef8d3a70fe5d12bbe Mon Sep 17 00:00:00 2001 From: George Rimar Date: Tue, 24 May 2016 12:48:46 +0000 Subject: Recommit r270547 ([llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.) Fix was: 1) Had to regenerate dwarfdump-test-zlib.elf-x86-64, dwarfdump-test-zlib-gnu.elf-x86-64 (because llvm-symbolizer-zlib.test uses that inputs for its purposes and failed). 2) Updated llvm-symbolizer-zlib.test (updated used call function address to match new files + added one more check for newly created dwarfdump-test-zlib-gnu.elf-x86-64 binary input). 3) Updated comment in dwarfdump-test-zlib.cc. Original commit message: [llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style. Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers, this patch adds support for zlib style. It looks reasonable to support both styles for dumping, even if we are not going to suport generating of deprecated gnu one. Differential revision: http://reviews.llvm.org/D20470 llvm-svn: 270557 --- llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc | 9 ++++++--- .../DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 | Bin 9589 -> 10448 bytes .../Inputs/dwarfdump-test-zlibgnu.elf-x86-64 | Bin 0 -> 10384 bytes 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 (limited to 'llvm/test/DebugInfo/Inputs') diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc index 260c3c435c1..966a465f904 100644 --- a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc +++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc @@ -16,9 +16,12 @@ int main() { return f(2, 3); } -// Built with Clang 3.2 and ld.gold linker: +// Built with Clang 3.9 and GNU gold (GNU Binutils for Ubuntu 2.26) 1.11: +// Note: llvm-symbolizer-zlib.test relies on the path and filename used ! // $ mkdir -p /tmp/dbginfo // $ cp dwarfdump-test-zlib.cc /tmp/dbginfo // $ cd /tmp/dbginfo -// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib \ -// -o +// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib -o dwarfdump-test-zlib.elf-x86-64 +// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib-gnu -o dwarfdump-test-zlibgnu.elf-x86-64 +// llvm-readobj -sections can be used to see that outputs really contain the compressed sections, also output in both +// cases is slightly smaller, that is because of compression. \ No newline at end of file diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 index 16b3153939f..36e630ccae0 100755 Binary files a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 and b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 differ diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 new file mode 100644 index 00000000000..0ad7a3d8511 Binary files /dev/null and b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 differ -- cgit v1.2.3