diff options
| author | Fangrui Song <maskray@google.com> | 2019-05-01 10:40:48 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2019-05-01 10:40:48 +0000 |
| commit | 5387c2cd17b2fb63df81298527614795ffc0abbb (patch) | |
| tree | 3d5d6a573b746e8b1ff83ffc8a724851d33bdc05 /llvm/test/tools | |
| parent | a7d107a3e07e805ccf96306e4059f97de0f92eaa (diff) | |
| download | bcm5719-llvm-5387c2cd17b2fb63df81298527614795ffc0abbb.tar.gz bcm5719-llvm-5387c2cd17b2fb63df81298527614795ffc0abbb.zip | |
[llvm-objdump] Print newlines before and after "Disassembly of section ...:"
This improves readability and the behavior is consistent with GNU objdump.
The new test test/tools/llvm-objdump/X86/disassemble-section-name.s
checks we print newlines before and after "Disassembly of section ...:"
Differential Revision: https://reviews.llvm.org/D61127
llvm-svn: 359668
Diffstat (limited to 'llvm/test/tools')
5 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/X86/disasm-specific-funcs.test b/llvm/test/tools/llvm-objdump/X86/disasm-specific-funcs.test index ad4274b31e6..8e6155710a4 100644 --- a/llvm/test/tools/llvm-objdump/X86/disasm-specific-funcs.test +++ b/llvm/test/tools/llvm-objdump/X86/disasm-specific-funcs.test @@ -2,6 +2,7 @@ // RUN: llvm-objdump -d %t.out -disassemble-functions=main | FileCheck %s // CHECK: Disassembly of section .anothertext: +// CHECK-EMPTY: // CHECK-NEXT: main: // CHECK-NEXT: 10: 55 pushq %rbp // CHECK-NEXT: 11: 48 89 e5 movq %rsp, %rbp diff --git a/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test b/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test index e84a5ac9611..ee8acb9edd4 100644 --- a/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test +++ b/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test @@ -20,6 +20,7 @@ # SKIP: 0000000000000000 .rodata: # SKIP-NEXT: ... +# SKIP-EMPTY: # SKIP-NEXT: Disassembly of section .rela.rodata: --- !ELF diff --git a/llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s b/llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s new file mode 100644 index 00000000000..655d5adc9c9 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s @@ -0,0 +1,9 @@ +# RUN: yaml2obj %p/Inputs/simple-executable-x86_64.yaml -o %t +# RUN: llvm-objdump -d %t | FileCheck %s + +# CHECK: : file format ELF64-x86-64 +# CHECK-EMPTY: +# CHECK-EMPTY: +# CHECK-NEXT: Disassembly of section .text: +# CHECK-EMPTY: +# CHECK-NEXT: 0000000000000000 foo: diff --git a/llvm/test/tools/llvm-objdump/X86/out-of-section-sym.test b/llvm/test/tools/llvm-objdump/X86/out-of-section-sym.test index 40fabbde58c..4da81c63ca3 100644 --- a/llvm/test/tools/llvm-objdump/X86/out-of-section-sym.test +++ b/llvm/test/tools/llvm-objdump/X86/out-of-section-sym.test @@ -6,6 +6,7 @@ // RUN: FileCheck --input-file %t0 %s CHECK: Disassembly of section .text: +CHECK-EMPTY: CHECK-NEXT: _start: CHECK-NEXT: 10: c3 retl CHECK-NEXT: SYMBOL TABLE: diff --git a/llvm/test/tools/llvm-objdump/X86/start-stop-address.test b/llvm/test/tools/llvm-objdump/X86/start-stop-address.test index 97c1f45b03a..4df49a92818 100644 --- a/llvm/test/tools/llvm-objdump/X86/start-stop-address.test +++ b/llvm/test/tools/llvm-objdump/X86/start-stop-address.test @@ -4,6 +4,7 @@ // RUN: llvm-objdump -d %t.out --start-address=0x40 --stop-address=0x47 | FileCheck %s --check-prefix "CROSSDATA" // CHECK: Disassembly of section .anothertext: +// CHECK-EMPTY: // CHECK-NEXT: main: // CHECK-NEXT: 18: 48 8d 04 25 a8 00 00 00 leaq 168, %rax // CHECK-NEXT: 20: c7 45 fc 00 00 00 00 movl $0, -4(%rbp) @@ -12,10 +13,13 @@ // CHECK-NOT: 2f: // CROSSSECTION: Disassembly of section .text: +// CROSSSECTION-EMPTY: // CROSSSECTION-NEXT: foo: // CROSSSECTION-NEXT: c: c3 retq // CROSSSECTION-NEXT: d: 0f 1f 00 nopl (%rax) +// CROSSSECTION-EMPTY: // CROSSSECTION-NEXT: Disassembly of section .anothertext: +// CROSSSECTION-EMPTY: // CROSSSECTION-NEXT: main: // CROSSSECTION-NEXT: 10: 55 pushq %rbp // CROSSSECTION-NOT: 11: |

