[llvm] r244504 - Add a test showing that objdump (and so ObjectFIle) can handle shndx.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 14:00:15 PDT 2015


Author: rafael
Date: Mon Aug 10 16:00:15 2015
New Revision: 244504

URL: http://llvm.org/viewvc/llvm-project?rev=244504&view=rev
Log:
Add a test showing that objdump (and so ObjectFIle) can handle shndx.

It was already passing, we were just not testing the code.

Added:
    llvm/trunk/test/Object/Inputs/shndx.elf
    llvm/trunk/test/Object/objdump-shndx.test

Added: llvm/trunk/test/Object/Inputs/shndx.elf
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/shndx.elf?rev=244504&view=auto
==============================================================================
Binary files llvm/trunk/test/Object/Inputs/shndx.elf (added) and llvm/trunk/test/Object/Inputs/shndx.elf Mon Aug 10 16:00:15 2015 differ

Added: llvm/trunk/test/Object/objdump-shndx.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-shndx.test?rev=244504&view=auto
==============================================================================
--- llvm/trunk/test/Object/objdump-shndx.test (added)
+++ llvm/trunk/test/Object/objdump-shndx.test Mon Aug 10 16:00:15 2015
@@ -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




More information about the llvm-commits mailing list