mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-15 07:59:57 +00:00
[llvm-objdump] Prep for adding newlines before and after "Disassembly of section ...:"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32986d30ff
commit
777fdf4844
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user