Index: llvm/test/tools/llvm-readobj/ELF/mips-st-other.test =================================================================== --- llvm/test/tools/llvm-readobj/ELF/mips-st-other.test +++ /dev/null @@ -1,25 +0,0 @@ -RUN: llvm-readobj --symbols %p/Inputs/st-other.obj.elf-mips \ -RUN: | FileCheck -check-prefix=MREG %s -RUN: llvm-readobj --symbols %p/Inputs/st-other.obj.elf-mips16 \ -RUN: | FileCheck -check-prefix=M16 %s - -MREG: Name: foo -MREG-NEXT: Value: 0x0 -MREG-NEXT: Size: 0 -MREG-NEXT: Binding: Global -MREG-NEXT: Type: None -MREG-NEXT: Other [ (0x29) -MREG-NEXT: STO_MIPS_PIC (0x20) -MREG-NEXT: STO_MIPS_PLT (0x8) -MREG-NEXT: STV_INTERNAL (0x1) -MREG-NEXT: ] - -M16: Name: foo -M16-NEXT: Value: 0x0 -M16-NEXT: Size: 0 -M16-NEXT: Binding: Global -M16-NEXT: Type: None -M16-NEXT: Other [ (0xF1) -M16-NEXT: STO_MIPS_MIPS16 (0xF0) -M16-NEXT: STV_INTERNAL (0x1) -M16-NEXT: ] Index: llvm/test/tools/llvm-readobj/ELF/mips-symbols-stother.test =================================================================== --- /dev/null +++ llvm/test/tools/llvm-readobj/ELF/mips-symbols-stother.test @@ -0,0 +1,39 @@ +## Check that we are able to dump MIPS STO_* flags correctly when dumping symbols. + +# RUN: yaml2obj %s -o %t.o +# RUN: llvm-readobj --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-LLVM +# RUN: llvm-readelf --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-GNU + +# MIPS-LLVM:Name: foo +# MIPS-LLVM:Other [ +# MIPS-LLVM-NEXT: STO_MIPS_MICROMIPS (0x80) +# MIPS-LLVM-NEXT: STO_MIPS_OPTIONAL (0x4) +# MIPS-LLVM-NEXT: STO_MIPS_PIC (0x20) +# MIPS-LLVM-NEXT: STO_MIPS_PLT (0x8) +# MIPS-LLVM-NEXT:] + +# MIPS-LLVM:Name: bar +# MIPS-LLVM:Other [ +# MIPS-LLVM-NEXT: STO_MIPS_MIPS16 (0xF0) +# MIPS-LLVM-NEXT:] + +# MIPS-GNU:Symbol table '.symtab' contains 3 entries: +# MIPS-GNU-NEXT: Num: Value Size Type Bind Vis Ndx Name +# MIPS-GNU-NEXT: 0: 00000000 0 NOTYPE LOCAL DEFAULT UND +# MIPS-GNU-NEXT: 1: 00000000 0 NOTYPE LOCAL DEFAULT [] UND foo +# MIPS-GNU-NEXT: 2: 00000000 0 NOTYPE LOCAL DEFAULT [] UND bar + +--- !ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS +Symbols: + - Name: foo + Other: [ STO_MIPS_MICROMIPS, STO_MIPS_PIC, + STO_MIPS_PLT, STO_MIPS_OPTIONAL] +## Use a different symbol for STO_MIPS_MIPS16 (0xf0) as it interferes +## with STO_MIPS_PIC (0x20) and STO_MIPS_MICROMIPS (0x80). + - Name: bar + Other: [ STO_MIPS_MIPS16 ]