1# RUN: yaml2obj %s -o %t.o
2# RUN: llvm-nm %t.o | FileCheck %s --check-prefix=DEFAULT
3# RUN: llvm-nm --no-sort %t.o | FileCheck %s --check-prefix=NOSORT
4# RUN: llvm-nm -p %t.o | FileCheck %s --check-prefix=NOSORT
5
6!ELF
7FileHeader:
8  Class:   ELFCLASS64
9  Data:    ELFDATA2LSB
10  Type:    ET_REL
11  Machine: EM_X86_64
12Sections:
13  - Name: .text
14    Type: SHT_PROGBITS
15Symbols:
16  - Name:    symbol_a
17    Section: .text
18    Value:   0x100
19  - Name:    symbol_b
20    Section: .text
21    Value:   0x25
22  - Name:    symbol_d
23    Section: .text
24    Value:   0x25
25  - Name:    symbol_c
26    Section: .text
27    Value:   0x50
28
29# The default is to sort by symbol name.
30# DEFAULT:      0000000000000100 n symbol_a
31# DEFAULT-NEXT: 0000000000000025 n symbol_b
32# DEFAULT-NEXT: 0000000000000050 n symbol_c
33# DEFAULT-NEXT: 0000000000000025 n symbol_d
34
35# When --no-sort is specified then the symbols are output in
36# symbol table order.
37# NOSORT:      0000000000000100 n symbol_a
38# NOSORT-NEXT: 0000000000000025 n symbol_b
39# NOSORT-NEXT: 0000000000000025 n symbol_d
40# NOSORT-NEXT: 0000000000000050 n symbol_c
41