brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · cc6a139 Raw
74 lines · plain
1## Check that we are able to dump MIPS STO_* flags correctly when dumping symbols.2 3# RUN: yaml2obj %s -o %t.o4# RUN: llvm-readobj --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-LLVM5# RUN: llvm-readobj --symbols %t.o --elf-output-style=JSON --pretty-print | FileCheck %s --check-prefix=MIPS-JSON6# RUN: llvm-readelf --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-GNU7 8#      MIPS-LLVM:Name: foo9#      MIPS-LLVM:Other [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)14# MIPS-LLVM-NEXT:]15 16#      MIPS-LLVM:Name: bar17#      MIPS-LLVM:Other [18# MIPS-LLVM-NEXT:  STO_MIPS_MIPS16 (0xF0)19# MIPS-LLVM-NEXT:]20 21#      MIPS-GNU:Symbol table '.symtab' contains 3 entries:22# MIPS-GNU-NEXT:  Num:    Value  Size Type    Bind   Vis                    Ndx Name23# MIPS-GNU-NEXT:    0: 00000000     0 NOTYPE  LOCAL  DEFAULT                UND24# MIPS-GNU-NEXT:    1: 00000000     0 NOTYPE  LOCAL  DEFAULT [<other: 0xac>] UND foo25# MIPS-GNU-NEXT:    2: 00000000     0 NOTYPE  LOCAL  DEFAULT [<other: 0xf0>] UND bar26 27# MIPS-JSON:      "Name": "foo",28# MIPS-JSON:      "Other": {29# MIPS-JSON-NEXT:   "Value": 172,30# MIPS-JSON-NEXT:   "Flags": [31# MIPS-JSON-NEXT:     {32# MIPS-JSON-NEXT:       "Name": "STO_MIPS_MICROMIPS",33# MIPS-JSON-NEXT:       "Value": 12834# MIPS-JSON-NEXT:     },35# MIPS-JSON-NEXT:     {36# MIPS-JSON-NEXT:       "Name": "STO_MIPS_OPTIONAL",37# MIPS-JSON-NEXT:       "Value": 438# MIPS-JSON-NEXT:     },39# MIPS-JSON-NEXT:     {40# MIPS-JSON-NEXT:       "Name": "STO_MIPS_PIC",41# MIPS-JSON-NEXT:       "Value": 3242# MIPS-JSON-NEXT:     },43# MIPS-JSON-NEXT:     {44# MIPS-JSON-NEXT:       "Name": "STO_MIPS_PLT",45# MIPS-JSON-NEXT:       "Value": 846# MIPS-JSON-NEXT:     }47# MIPS-JSON-NEXT:   ]48# MIPS-JSON-NEXT: },49# MIPS-JSON:      "Name": "bar",50# MIPS-JSON:      "Other": {51# MIPS-JSON-NEXT:   "Value": 240,52# MIPS-JSON-NEXT:   "Flags": [53# MIPS-JSON-NEXT:     {54# MIPS-JSON-NEXT:       "Name": "STO_MIPS_MIPS16",55# MIPS-JSON-NEXT:       "Value": 24056# MIPS-JSON-NEXT:     }57# MIPS-JSON-NEXT:   ]58# MIPS-JSON-NEXT: },59 60--- !ELF61FileHeader:62  Class:   ELFCLASS3263  Data:    ELFDATA2LSB64  Type:    ET_REL65  Machine: EM_MIPS66Symbols:67  - Name: foo68    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 interferes71## with STO_MIPS_PIC (0x20) and STO_MIPS_MICROMIPS (0x80).72  - Name: bar73    Other: [ STO_MIPS_MIPS16 ]74