1 ## Test that in the presence of SHT_LLVM_BB_ADDR_MAP sections,
2 ## --symbolize-operands can display <BB*> labels.
4 ## Fails on windows (https://github.com/llvm/llvm-project/issues/60013).
5 # UNSUPPORTED: system-windows
7 ## Executable object file.
8 # RUN: yaml2obj --docnum=1 -DFOO_ADDR=0x4000 -DBAR_ADDR=0x5000 %s -o %t1
9 # RUN: llvm-objdump %t1 -d --symbolize-operands -M intel --no-show-raw-insn --no-leading-addr | \
10 # RUN: FileCheck %s -DSYM=symbol --match-full-lines --check-prefixes=INTEL
11 # RUN: llvm-objdump %t1 -d --symbolize-operands -M att --no-show-raw-insn --no-leading-addr | \
12 # RUN: FileCheck %s -DSYM=symbol --match-full-lines --check-prefixes=ATT
14 ## Executable object file with a single SHT_LLVM_BB_ADDR_MAP for multiple text sections.
15 # RUN: yaml2obj --docnum=2 %s -o %t3
16 # RUN: llvm-objdump %t3 -d --symbolize-operands -M intel --no-show-raw-insn --no-leading-addr | \
17 # RUN: FileCheck %s -DSYM=symbol --match-full-lines --check-prefixes=INTEL
18 # RUN: llvm-objdump %t3 -d --symbolize-operands -M att --no-show-raw-insn --no-leading-addr | \
19 # RUN: FileCheck %s -DSYM=symbol --match-full-lines --check-prefixes=ATT
21 ## Expect to find the branch and basic block labels and global variable name.
24 # ATT-NEXT: pushq %rax
26 # ATT-NEXT: cmpl , %eax <[[SYM]]>
35 # ATT-NEXT: pushq %rax
36 # ATT-NEXT: movl %edx, %eax
39 # ATT-NEXT: xorl %esi, %esi
41 # ATT-NEXT: callq <bar>
46 # INTEL-NEXT: push rax
48 # INTEL-NEXT: cmp eax, dword ptr <[[SYM]]>
51 # INTEL-NEXT: jge <BB5>
52 # INTEL-NEXT: jmp <BB1>
57 # INTEL-NEXT: push rax
58 # INTEL-NEXT: mov eax, edx
59 # INTEL-NEXT: je <BB2>
61 # INTEL-NEXT: xor esi, esi
63 # INTEL-NEXT: call <bar>
66 ## This object file contains a separate text section and SHT_LLVM_BB_ADDR_MAP
67 ## section for each of the two functions foo and bar.
68 ## This is used to test --symbolize-operands on reloctable and non-relocotable
80 Flags: [SHF_ALLOC, SHF_EXECINSTR]
81 Content: '503b0505200000907d02ebf5c3'
85 Flags: [SHF_ALLOC, SHF_EXECINSTR]
86 Content: '5089d0740231f6e8f4ffffffc3'
89 Flags: [SHF_ALLOC, SHF_WRITE]
91 - Name: .llvm_bb_addr_map.foo
92 Type: SHT_LLVM_BB_ADDR_MAP
114 - Name: .llvm_bb_addr_map.bar
115 Type: SHT_LLVM_BB_ADDR_MAP
119 Address: [[BAR_ADDR]]
142 ## This object file contains a single SHT_LLVM_BB_ADDR_MAP for two text
143 ## sections .text.foo and .text.bar.
154 Flags: [SHF_ALLOC, SHF_EXECINSTR]
155 Content: '503b0505200000907d02ebf5c3'
159 Flags: [SHF_ALLOC, SHF_EXECINSTR]
160 Content: '5089d0740231f6e8f4ffffffc3'
163 Flags: [SHF_ALLOC, SHF_WRITE]
165 - Name: .llvm_bb_addr_map.foo
166 Type: SHT_LLVM_BB_ADDR_MAP