1 ## Verify that llvm-readobj can dump files with stabs symbols in a sorted order.
3 # RUN: yaml2obj --docnum=1 %s -o %t
5 # RUN: not llvm-readobj --syms --sort-symbols=foo %t 2>&1 | FileCheck %s --check-prefix ERR-KEY
6 # RUN: not llvm-readobj --syms --sort-symbols=,, %t 2>&1 | FileCheck %s --check-prefix ERR-KEY-EMPT
8 # RUN: llvm-readobj --syms --sort-symbols=type,name %t | FileCheck %s --check-prefix TYPE-NAME
9 # RUN: llvm-readobj --syms --sort-symbols=name,type %t | FileCheck %s --check-prefix NAME-TYPE
10 # RUN: llvm-readobj --syms --sort-symbols=type %t | FileCheck %s --check-prefix TYPE-ONLY
12 # ERR-KEY: error: --sort-symbols value should be 'name' or 'type', but was 'foo'
13 # ERR-KEY-EMPT: error: --sort-symbols value should be 'name' or 'type', but was ''
15 # TYPE-NAME: Name: _a (19)
16 # TYPE-NAME-NEXT: Type: Section (0xE)
17 # TYPE-NAME: Name: _d (10)
18 # TYPE-NAME-NEXT: Type: Section (0xE)
19 # TYPE-NAME: Name: _f (7)
20 # TYPE-NAME-NEXT: Type: SymDebugTable (0x2E)
21 # TYPE-NAME: Name: _z (1)
22 # TYPE-NAME-NEXT: Type: SymDebugTable (0x2E)
23 # TYPE-NAME: Name: _c (13)
24 # TYPE-NAME-NEXT: Type: SymDebugTable (0x64)
25 # TYPE-NAME: Name: _g (4)
26 # TYPE-NAME-NEXT: Type: SymDebugTable (0x64)
27 # TYPE-NAME: Name: _b (16)
28 # TYPE-NAME-NEXT: Type: SymDebugTable (0x66)
29 # TYPE-NAME: Name: _d2 (22)
30 # TYPE-NAME-NEXT: Type: SymDebugTable (0x66)
32 # NAME-TYPE: Name: _a (19)
33 # NAME-TYPE-NEXT: Type: Section (0xE)
34 # NAME-TYPE: Name: _b (16)
35 # NAME-TYPE-NEXT: Type: SymDebugTable (0x66)
36 # NAME-TYPE: Name: _c (13)
37 # NAME-TYPE-NEXT: Type: SymDebugTable (0x64)
38 # NAME-TYPE: Name: _d (10)
39 # NAME-TYPE-NEXT: Type: Section (0xE)
40 # NAME-TYPE: Name: _d2 (22)
41 # NAME-TYPE-NEXT: Type: SymDebugTable (0x66)
42 # NAME-TYPE: Name: _f (7)
43 # NAME-TYPE-NEXT: Type: SymDebugTable (0x2E)
44 # NAME-TYPE: Name: _g (4)
45 # NAME-TYPE-NEXT: Type: SymDebugTable (0x64)
46 # NAME-TYPE: Name: _z (1)
47 # NAME-TYPE-NEXT: Type: SymDebugTable (0x2E)
49 # TYPE-ONLY: Name: _d (10)
50 # TYPE-ONLY-NEXT: Type: Section (0xE)
51 # TYPE-ONLY: Name: _a (19)
52 # TYPE-ONLY-NEXT: Type: Section (0xE)
53 # TYPE-ONLY: Name: _f (7)
54 # TYPE-ONLY-NEXT: Type: SymDebugTable (0x2E)
55 # TYPE-ONLY: Name: _z (1)
56 # TYPE-ONLY-NEXT: Type: SymDebugTable (0x2E)
57 # TYPE-ONLY: Name: _g (4)
58 # TYPE-ONLY-NEXT: Type: SymDebugTable (0x64)
59 # TYPE-ONLY: Name: _c (13)
60 # TYPE-ONLY-NEXT: Type: SymDebugTable (0x64)
61 # TYPE-ONLY: Name: _d2 (22)
62 # TYPE-ONLY-NEXT: Type: SymDebugTable (0x66)
63 # TYPE-ONLY: Name: _b (16)
64 # TYPE-ONLY-NEXT: Type: SymDebugTable (0x66)
101 content: '000000000000000000'
111 - sectname: more_data
123 content: 7B00000000000000
136 content: 7B00000000000000000000