Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-objdump / X86 / section-index.s
blob6ca86ea19b5715b7d6a7535dba6fcf1a614dde2b
1 # RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t
3 # RUN: llvm-objdump -section-headers %t | FileCheck %s
4 # CHECK: Idx Name
5 # CHECK: 3 .foo
6 # CHECK-NEXT: 4 .bar
7 # CHECK-NEXT: 5 .zed
9 ## Check we report the valid section index
10 ## when requesting a specific section.
11 # RUN: llvm-objdump -section-headers -section=.bar %t \
12 # RUN: | FileCheck %s --check-prefix=BAR
13 # BAR: Idx Name
14 # BAR-NEXT: 4 .bar
15 # BAR-NOT: foo
16 # BAR-NOT: zed
18 .section .foo, "ax", %progbits
19 nop
21 .section .bar, "ax", %progbits
22 nop
24 .section .zed, "ax", %progbits
25 nop