1 ## Check that we are able to dump MIPS STO_* flags correctly when dumping symbols.
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: llvm-readobj --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-LLVM
5 # RUN: llvm-readobj --symbols %t.o --elf-output-style=JSON --pretty-print | FileCheck %s --check-prefix=MIPS-JSON
6 # RUN: llvm-readelf --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-GNU
10 # MIPS-LLVM-NEXT: STO_MIPS_MICROMIPS (0x80)
11 # MIPS-LLVM-NEXT: STO_MIPS_OPTIONAL (0x4)
12 # MIPS-LLVM-NEXT: STO_MIPS_PIC (0x20)
13 # MIPS-LLVM-NEXT: STO_MIPS_PLT (0x8)
18 # MIPS-LLVM-NEXT: STO_MIPS_MIPS16 (0xF0)
21 # MIPS-GNU:Symbol table '.symtab' contains 3 entries:
22 # MIPS-GNU-NEXT: Num: Value Size Type Bind Vis Ndx Name
23 # MIPS-GNU-NEXT: 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
24 # MIPS-GNU-NEXT: 1: 00000000 0 NOTYPE LOCAL DEFAULT [<other: 0xac>] UND foo
25 # MIPS-GNU-NEXT: 2: 00000000 0 NOTYPE LOCAL DEFAULT [<other: 0xf0>] UND bar
27 # MIPS-JSON: "Name": "foo",
28 # MIPS-JSON: "Other": {
29 # MIPS-JSON-NEXT: "Value": 172,
30 # MIPS-JSON-NEXT: "Flags": [
32 # MIPS-JSON-NEXT: "Name": "STO_MIPS_MICROMIPS",
33 # MIPS-JSON-NEXT: "Value": 128
36 # MIPS-JSON-NEXT: "Name": "STO_MIPS_OPTIONAL",
37 # MIPS-JSON-NEXT: "Value": 4
40 # MIPS-JSON-NEXT: "Name": "STO_MIPS_PIC",
41 # MIPS-JSON-NEXT: "Value": 32
44 # MIPS-JSON-NEXT: "Name": "STO_MIPS_PLT",
45 # MIPS-JSON-NEXT: "Value": 8
49 # MIPS-JSON: "Name": "bar",
50 # MIPS-JSON: "Other": {
51 # MIPS-JSON-NEXT: "Value": 240,
52 # MIPS-JSON-NEXT: "Flags": [
54 # MIPS-JSON-NEXT: "Name": "STO_MIPS_MIPS16",
55 # MIPS-JSON-NEXT: "Value": 240
68 Other: [ STO_MIPS_MICROMIPS, STO_MIPS_PIC,
69 STO_MIPS_PLT, STO_MIPS_OPTIONAL]
70 ## Use a different symbol for STO_MIPS_MIPS16 (0xf0) as it interferes
71 ## with STO_MIPS_PIC (0x20) and STO_MIPS_MICROMIPS (0x80).
73 Other: [ STO_MIPS_MIPS16 ]