summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-04-19 17:02:57 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-04-19 17:02:57 +0000
commit1834682b97f498093684674f8f0d95113ef3cb66 (patch)
tree7f13ae57ff184fa52b3d8edc807ec9f59956d121 /llvm/test/tools
parentaa94393ec538f2d65eb9a419a61937bdc954d01d (diff)
downloadbcm5719-llvm-1834682b97f498093684674f8f0d95113ef3cb66.tar.gz
bcm5719-llvm-1834682b97f498093684674f8f0d95113ef3cb66.zip
[llvm-objdump] Print "..." instead of random data for virtual sections
When disassembling with -D, skip virtual sections by printing "..." for each symbol. This patch also implements `MachOObjectFile::isSectionVirtual`. Test case comes from: ``` .zerofill __DATA,__common,_data64unsigned,472,3 ``` Differential Revision: https://reviews.llvm.org/D45824 llvm-svn: 330342
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/llvm-objdump/AArch64/macho-zerofill.s9
-rw-r--r--llvm/test/tools/llvm-objdump/Inputs/zerofill.macho-x86_64.obin0 -> 448 bytes
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/AArch64/macho-zerofill.s b/llvm/test/tools/llvm-objdump/AArch64/macho-zerofill.s
new file mode 100644
index 00000000000..b790bb89f08
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/AArch64/macho-zerofill.s
@@ -0,0 +1,9 @@
+// RUN: llvm-mc < %s -triple aarch64-macho -filetype=obj | llvm-objdump -triple=aarch64-- -D - | FileCheck %s
+
+
+// Check that we don't print garbage when we dump zerofill sections.
+
+.zerofill __DATA,__common,_data64unsigned,472,3
+// CHECK: Disassembly of section __DATA,__common:
+// CHECK: ltmp1:
+// CHECK-NEXT: ...
diff --git a/llvm/test/tools/llvm-objdump/Inputs/zerofill.macho-x86_64.o b/llvm/test/tools/llvm-objdump/Inputs/zerofill.macho-x86_64.o
new file mode 100644
index 00000000000..272d7d5ccdf
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/Inputs/zerofill.macho-x86_64.o
Binary files differ
OpenPOWER on IntegriCloud