OSDN Git Service

Add a test showing that objdump (and so ObjectFIle) can handle shndx.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 10 Aug 2015 21:00:15 +0000 (21:00 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 10 Aug 2015 21:00:15 +0000 (21:00 +0000)
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

test/Object/Inputs/shndx.elf [new file with mode: 0644]
test/Object/objdump-shndx.test [new file with mode: 0644]

diff --git a/test/Object/Inputs/shndx.elf b/test/Object/Inputs/shndx.elf
new file mode 100644 (file)
index 0000000..f1e0a3a
Binary files /dev/null and b/test/Object/Inputs/shndx.elf differ
diff --git a/test/Object/objdump-shndx.test b/test/Object/objdump-shndx.test
new file mode 100644 (file)
index 0000000..dcdb3c2
--- /dev/null
@@ -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