[llvm] r359181 - [llvm-objdump] Prep for adding newlines before and after "Disassembly of section ...:"

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 03:25:52 PDT 2019


Author: maskray
Date: Thu Apr 25 03:25:52 2019
New Revision: 359181

URL: http://llvm.org/viewvc/llvm-project?rev=359181&view=rev
Log:
[llvm-objdump] Prep for adding newlines before and after "Disassembly of section ...:"

Modified:
    llvm/trunk/test/tools/llvm-objdump/X86/adjust-vma.test
    llvm/trunk/test/tools/llvm-objdump/X86/demangle.s
    llvm/trunk/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test
    llvm/trunk/test/tools/llvm-objdump/X86/print-symbol-addr.s

Modified: llvm/trunk/test/tools/llvm-objdump/X86/adjust-vma.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/adjust-vma.test?rev=359181&r1=359180&r2=359181&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/adjust-vma.test (original)
+++ llvm/trunk/test/tools/llvm-objdump/X86/adjust-vma.test Thu Apr 25 03:25:52 2019
@@ -3,49 +3,41 @@
 # RUN: llvm-objdump --all-headers -D -z --adjust-vma=0x0 %t | FileCheck %s --check-prefixes=COMMON,NOADJUST
 # RUN: llvm-objdump --all-headers -D -z --adjust-vma=0x123000 %t | FileCheck %s --check-prefixes=COMMON,ADJUST
 
-# NOADJUST:      Disassembly of section .text:
-# NOADJUST-NEXT: 0000000000000000 sym:
+# NOADJUST:      0000000000000000 sym:
 # NOADJUST-NEXT:   0: {{.*}}  nop
 # NOADJUST:      0000000000000001 func:
 # NOADJUST-NEXT:   1: {{.*}}  retq
 
-# ADJUST:        Disassembly of section .text:
-# ADJUST-NEXT:   0000000000123000 sym:
+# ADJUST:        0000000000123000 sym:
 # ADJUST-NEXT:     123000: {{.*}} nop
 # ADJUST:        0000000000123001 func:
 # ADJUST-NEXT:     123001: {{.*}} retq
 
-# NOADJUST:      Disassembly of section .debug_str:
-# NOADJUST-NEXT: 0000000000000000 .debug_str:
+# NOADJUST:      0000000000000000 .debug_str:
 # NOADJUST-NEXT:   0: {{.*}}  %al, (%rax)
 # NOADJUST-NEXT:      0000000000000001:  R_X86_64_32  .text
 # NOADJUST-NEXT:   2: {{.*}}  addb    %al, (%rax)
 
-# ADJUST:        Disassembly of section .debug_str:
-# ADJUST-NEXT:   0000000000000000 .debug_str:
+# ADJUST:        0000000000000000 .debug_str:
 # ADJUST-NEXT:     0: {{.*}}  %al, (%rax)
 # ADJUST-NEXT:        0000000000123001:  R_X86_64_32  .text
 # ADJUST-NEXT:     2: {{.*}}  addb    %al, (%rax)
 
-# COMMON:        Disassembly of section .rela.debug_str:
-# COMMON-NEXT:   0000000000000000    .rela.debug_str:
+# COMMON:        0000000000000000    .rela.debug_str:
 # COMMON-NEXT:     0: {{.*}}  addl %eax, (%rax)
 ## ... There are more lines here. We do not care.
 
-# NOADJUST:      Disassembly of section .data:
-# NOADJUST-NEXT: 0000000000000000  .data:
+# NOADJUST:      0000000000000000  .data:
 # NOADJUST-NEXT:  0: {{.*}} addb    %al, (%rax)
 # NOADJUST-NEXT: 0000000000000000: R_X86_64_32  .text
 # NOADJUST-NEXT:  2: {{.*}} addb    %al, (%rax)
 
-# ADJUST:        Disassembly of section .data:
-# ADJUST-NEXT:   0000000000123000  .data:
+# ADJUST:        0000000000123000  .data:
 # ADJUST-NEXT:    123000: {{.*}}  addb    %al, (%rax)
 # ADJUST-NEXT:   0000000000123000: R_X86_64_32  .text
 # ADJUST-NEXT:    123002: {{.*}}  addb    %al, (%rax)
 
-# COMMON:        Disassembly of section .rela.data:
-# COMMON-NEXT:   0000000000000000   .rela.data:
+# COMMON:        0000000000000000   .rela.data:
 # COMMON-NEXT:    0: {{.*}} addb %al, (%rax)
 ## ... There are more lines here. We do not care.
 

Modified: llvm/trunk/test/tools/llvm-objdump/X86/demangle.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/demangle.s?rev=359181&r1=359180&r2=359181&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/demangle.s (original)
+++ llvm/trunk/test/tools/llvm-objdump/X86/demangle.s Thu Apr 25 03:25:52 2019
@@ -1,5 +1,5 @@
 # RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t
-# RUN: llvm-objdump -syms -reloc -demangle %t | FileCheck %s
+# RUN: llvm-objdump -t -r --demangle %t | FileCheck %s
 
 ## Check we demangle symbols when printing relocations.
 # CHECK:      000000000000001 R_X86_64_PLT32 foo()-4
@@ -9,9 +9,8 @@
 # CHECK-NEXT: 0000000000000000 g     F .text           00000000 foo()
 
 ## Check the case when relocations are inlined into disassembly.
-# RUN: llvm-objdump -d -r -demangle %t | FileCheck %s --check-prefix=INLINE
-# INLINE:      Disassembly of section .text:
-# INLINE-NEXT: foo():
+# RUN: llvm-objdump -d -r --demangle %t | FileCheck %s --check-prefix=INLINE
+# INLINE:      foo():
 # INLINE-NEXT:  0: {{.*}}  callq   0 <_Z3foov+0x5>
 # INLINE-NEXT:  0000000000000001:  R_X86_64_PLT32 foo()-4
 

Modified: llvm/trunk/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test?rev=359181&r1=359180&r2=359181&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test (original)
+++ llvm/trunk/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test Thu Apr 25 03:25:52 2019
@@ -1,10 +1,9 @@
 # RUN: yaml2obj %s > %t
 
 ## Check we do not skip zeroes blocks if have relocations pointed to these places.
-# RUN: llvm-objdump -D -reloc %t
+# RUN: llvm-objdump -D --reloc %t
 
-# CHECK:      Disassembly of section .rodata:
-# CHECK-NEXT: 0000000000000000 .rodata:
+# CHECK:      0000000000000000 .rodata:
 # CHECK-NEXT:        0:       00 00   addb    %al, (%rax)
 # CHECK-NEXT:                 0000000000000000:  R_X86_64_64  *ABS*
 # CHECK-NEXT:        2:       00 00   addb    %al, (%rax)
@@ -19,8 +18,7 @@
 ## Check that without -reloc all zeroes would be omitted.
 # RUN: llvm-objdump -D %t | FileCheck %s --check-prefix=SKIP
 
-# SKIP:      Disassembly of section .rodata:
-# SKIP-NEXT: 0000000000000000 .rodata:
+# SKIP:      0000000000000000 .rodata:
 # SKIP-NEXT:   ...
 # SKIP-NEXT: Disassembly of section .rela.rodata:
 

Modified: llvm/trunk/test/tools/llvm-objdump/X86/print-symbol-addr.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/print-symbol-addr.s?rev=359181&r1=359180&r2=359181&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/print-symbol-addr.s (original)
+++ llvm/trunk/test/tools/llvm-objdump/X86/print-symbol-addr.s Thu Apr 25 03:25:52 2019
@@ -2,17 +2,15 @@
 
 // Check we print the address of `foo` and `bar`.
 // RUN: llvm-objdump -d %t.o | FileCheck %s
-// CHECK:      Disassembly of section .text:
-// CHECK-NEXT: 0000000000000000 foo:
+// CHECK:      0000000000000000 foo:
 // CHECK-NEXT:   0: {{.*}}  nop
 // CHECK-NEXT:   1: {{.*}}  nop
 // CHECK:      0000000000000002 bar:
 // CHECK-NEXT:   2: {{.*}}  nop
 
 // Check we do not print the addresses with -no-leading-addr.
-// RUN: llvm-objdump -d -no-leading-addr %t.o | FileCheck %s --check-prefix=NOADDR
-// NOADDR:      Disassembly of section .text:
-// NOADDR-NEXT: {{^}}foo:
+// RUN: llvm-objdump -d --no-leading-addr %t.o | FileCheck %s --check-prefix=NOADDR
+// NOADDR:      {{^}}foo:
 // NOADDR-NEXT:   {{.*}} nop
 // NOADDR-NEXT:   {{.*}} nop
 // NOADDR:      {{^}}bar:




More information about the llvm-commits mailing list