]> granicus.if.org Git - llvm/commitdiff
[llvm-objdump]Move test code missed in r360904
authorJames Henderson <jh7370@my.bristol.ac.uk>
Thu, 16 May 2019 15:20:08 +0000 (15:20 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Thu, 16 May 2019 15:20:08 +0000 (15:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360909 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-objdump/X86/section-filter-relocs.test [moved from test/tools/llvm-objdump/X86/section-filter-disasm.test with 77% similarity]
test/tools/llvm-objdump/section-filter.test

similarity index 77%
rename from test/tools/llvm-objdump/X86/section-filter-disasm.test
rename to test/tools/llvm-objdump/X86/section-filter-relocs.test
index 219bb55ec76eb1b200d106280b75e9f6a6a670d9..f36627e4c9a323ccc2d505a0968f214def92fc0d 100644 (file)
@@ -82,3 +82,22 @@ Sections:
         Type: R_X86_64_NONE
 Symbols:
   - Name: foo
+
+## Test that --section works when dumping relocation sections.
+# RUN: llvm-objdump -r %t.o --section=.another.rela.text --section=.rela.rodata \
+# RUN:   | FileCheck %s --check-prefix=DUMP-RELOCS --implicit-check-not=R_X86_64 \
+# RUN:                  --implicit-check-not="RELOCATION RECORDS"
+
+# DUMP-RELOCS: RELOCATION RECORDS FOR [.text]:
+# DUMP-RELOCS: 00000001 R_X86_64_GOT32 foo
+# DUMP-RELOCS: RELOCATION RECORDS FOR [.rodata]:
+# DUMP-RELOCS: 00000000 R_X86_64_NONE foo
+
+## Test that --section works with --full-contents.
+# RUN: llvm-objdump -s %t.o --section=.text --section=.rela.text2 \
+# RUN:   | FileCheck %s --check-prefix=CONTENTS \
+# RUN:                  --implicit-check-not=.text \
+# RUN:                  --implicit-check-not=.rodata
+
+# CONTENTS: Contents of section .text:
+# CONTENTS: Contents of section .rela.text2:
index 9094c2263e7d09e331134185b18657eb68abb7fb..0c1cd7eccce7ba20e01387ea318df10700f8e961 100644 (file)
@@ -57,30 +57,11 @@ ProgramHeaders:
     Sections:
       - Section: .bss
 
-## Test that --section works when dumping relocation sections.
-# RUN: llvm-objdump -r %t.o --section=.another.rela.text --section=.rela.rodata \
-# RUN:   | FileCheck %s --check-prefix=DUMP-RELOCS --implicit-check-not=R_X86_64 \
-# RUN:                  --implicit-check-not="RELOCATION RECORDS"
-
-# DUMP-RELOCS: RELOCATION RECORDS FOR [.text]:
-# DUMP-RELOCS: 00000001 R_X86_64_GOT32 foo
-# DUMP-RELOCS: RELOCATION RECORDS FOR [.rodata]:
-# DUMP-RELOCS: 00000000 R_X86_64_NONE foo
-
-## Test that --section works with --full-contents.
-# RUN: llvm-objdump -s %t.o --section=.text --section=.rela.text2 \
-# RUN:   | FileCheck %s --check-prefix=CONTENTS \
-# RUN:                  --implicit-check-not=.text \
-# RUN:                  --implicit-check-not=.rodata
-
-# CONTENTS: Contents of section .text:
-# CONTENTS: Contents of section .rela.text2:
-
 ## Test that --section works with --fault-map-section.
-# RUN: yaml2obj %s --docnum=2 -o %t2.o
-# RUN: llvm-objdump %t2.o --fault-map-section -j __clangast \
+# RUN: yaml2obj %s --docnum=2 -o %t.o
+# RUN: llvm-objdump %t.o --fault-map-section -j __clangast \
 # RUN:   | FileCheck %s --check-prefixes=FAULTMAP,NO-FAULTMAP
-# RUN: llvm-objdump %t2.o --fault-map-section -j .llvm_faultmaps \
+# RUN: llvm-objdump %t.o --fault-map-section -j .llvm_faultmaps \
 # RUN:   | FileCheck %s --check-prefixes=FAULTMAP,WITH-FAULTMAP
 
 # FAULTMAP:           FaultMap table:
@@ -89,9 +70,9 @@ ProgramHeaders:
 # WITH-FAULTMAP-NEXT: NumFunctions: 0
 
 ## Test that --section works with --raw-clang-ast.
-# RUN: llvm-objdump %t2.o --raw-clang-ast -j .llvm_faultmaps \
+# RUN: llvm-objdump %t.o --raw-clang-ast -j .llvm_faultmaps \
 # RUN:   | FileCheck %s --check-prefix=NO-AST --allow-empty
-# RUN: llvm-objdump %t2.o --raw-clang-ast -j __clangast \
+# RUN: llvm-objdump %t.o --raw-clang-ast -j __clangast \
 # RUN:   | FileCheck %s --check-prefix=CLANG-AST
 
 # NO-AST-NOT: {{.}}