summaryrefslogtreecommitdiff
path: root/test/Object/objdump-shndx.test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-08-10 21:00:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-08-10 21:00:15 +0000
commitafa388d65ef5e951865b56135bfa33f17d1bf265 (patch)
tree42755061f9a164ccab1a4776618383259557744f /test/Object/objdump-shndx.test
parent010fa7174d0367d545c0d766dafc95f150ac8ecc (diff)
Add a test showing that objdump (and so ObjectFIle) can handle shndx.
It was already passing, we were just not testing the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object/objdump-shndx.test')
-rw-r--r--test/Object/objdump-shndx.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Object/objdump-shndx.test b/test/Object/objdump-shndx.test
new file mode 100644
index 00000000000..dcdb3c2f093
--- /dev/null
+++ b/test/Object/objdump-shndx.test
@@ -0,0 +1,8 @@
+RUN: llvm-objdump -r %p/Inputs/shndx.elf | FileCheck %s
+
+Test that llvm-objdump can handle shndx. The relocation points to a section
+symbol that has st_shndx == SHN_XINDEX. To print the section name llvm-objdump
+has to use the shndx section.
+
+CHECK: RELOCATION RECORDS FOR [.rela.text]:
+CHECK-NEXT: 0000000000000000 R_X86_64_32 bar+0