aboutsummaryrefslogtreecommitdiffstats
path: root/test/Object
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-10-10 21:21:34 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-10-10 21:21:34 +0000
commit023bb15beaac3744ce3a5d1f750d6e32829c7130 (patch)
treee8638b87a4762891bec93abf5d5c50540b3773a4 /test/Object
parent735fe0f9d00facc5961fbb8b822844f5088cd81d (diff)
downloadexternal_llvm-023bb15beaac3744ce3a5d1f750d6e32829c7130.zip
external_llvm-023bb15beaac3744ce3a5d1f750d6e32829c7130.tar.gz
external_llvm-023bb15beaac3744ce3a5d1f750d6e32829c7130.tar.bz2
Add support for dumping section headers to llvm-objdump. This uses the same
flags as binutils objdump but the output is different, not just in format but also showing different sections. Compare its results against readelf, not objdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r--test/Object/objdump-sectionheaders.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Object/objdump-sectionheaders.test b/test/Object/objdump-sectionheaders.test
new file mode 100644
index 0000000..4515d00
--- /dev/null
+++ b/test/Object/objdump-sectionheaders.test
@@ -0,0 +1,16 @@
+; RUN: llvm-objdump -h %p/TestObjectFiles/trivial-object-test.elf-x86-64 \
+; RUN: | FileCheck %s
+
+; To verify this, use readelf -S, not objdump -h. Binutils objdump filters the
+; results in a way that we don't emulate.
+
+; CHECK: Sections:
+; CHECK: Idx Name Size Address Type
+; CHECK: 0 000000000 00000000000000000
+; CHECK: 1 .text 000000026 00000000000000000 TEXT DATA
+; CHECK: 2 .rodata.str1.1 00000000d 00000000000000026 DATA
+; CHECK: 3 .note.GNU-stack 000000000 00000000000000033
+; CHECK: 4 .rela.text 000000048 00000000000000038
+; CHECK: 5 .symtab 0000000c0 00000000000000080
+; CHECK: 6 .strtab 000000033 00000000000000140
+; CHECK: 7 .shstrtab 00000004b 00000000000000173