1 ## Show how --start-address and --stop-address work in a relocatable object.
2 ## They limit the disassembly to the relative offset ranges within sections.
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: llvm-objdump -d %t.o --start-address=1 --stop-address=2 | FileCheck %s --check-prefix=COMMON
5 # RUN: llvm-objdump -d %t.o --start-address=1 | FileCheck %s --check-prefixes=START,COMMON
6 # RUN: llvm-objdump -d %t.o --stop-address=2 | FileCheck %s --check-prefixes=STOP,COMMON
8 # COMMON: Disassembly of section .text:
10 # COMMON-NEXT: 0000000000000000 <.text>:
11 # STOP-NEXT: 0: 90 nop
12 # COMMON-NEXT: 1: 90 nop
13 # START-NEXT: 2: 90 nop
15 # COMMON-NEXT: Disassembly of section .text2:
17 # COMMON-NEXT: 0000000000000000 <.text2>:
18 # STOP-NEXT: 0: c3 retq
19 # COMMON-NEXT: 1: c3 retq
20 # START-NEXT: 2: c3 retq
22 # STOP-NEXT: Disassembly of section .text3:
24 # STOP-NEXT: 0000000000000000 <.text3>:
25 # STOP-NEXT: 0: cc int3
37 Flags: [SHF_ALLOC, SHF_EXECINSTR]
41 Flags: [SHF_ALLOC, SHF_EXECINSTR]
45 Flags: [SHF_ALLOC, SHF_EXECINSTR]