llvm-project/lld/test/elf/Mips/st-other.test

91 lines
2.4 KiB
Plaintext

# Check STO_MICROMIPS flag handling. microMIPS symbol records in a dynamic
# symbol table should not have STO_MICROMIPS flag but their value field
# must be odd. microMIPS symbol records in a regular symbol table should
# have the STO_MICROMIPS flag.
# RUN: yaml2obj -format=elf %s > %t-micro.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-micro.o
# RUN: llvm-readobj -dyn-symbols %t.so | FileCheck -check-prefix=SO %s
# RUN: lld -flavor gnu -target mipsel -e S0 -o %t.exe %t-micro.o
# RUN: llvm-readobj -symbols %t.exe | FileCheck -check-prefix=EXE-SYM %s
# RUN: llvm-readobj -dyn-symbols %t.exe | FileCheck -check-prefix=EXE-DSYM %s
# SO: Symbol {
# SO: Name: S0@ (1)
# SO-NEXT: Value: 0x{{[0-9A-F]+}}
# SO-NEXT: Size: 4
# SO-NEXT: Binding: Global (0x1)
# SO-NEXT: Type: Function (0x2)
# SO-NEXT: Other: 0
# SO-NEXT: Section: .text (0x4)
# SO-NEXT: }
# SO: Symbol {
# SO: Name: S1@ (4)
# SO-NEXT: Value: 0x{{[0-9A-F]+}}
# SO-NEXT: Size: 4
# SO-NEXT: Binding: Global (0x1)
# SO-NEXT: Type: Function (0x2)
# SO-NEXT: Other: 0
# SO-NEXT: Section: .text (0x4)
# SO-NEXT: }
# EXE-SYM: Symbol {
# EXE-SYM: Name: S0 (1)
# EXE-SYM-NEXT: Value: 0x{{[0-9A-F]+}}
# EXE-SYM-NEXT: Size: 4
# EXE-SYM-NEXT: Binding: Global (0x1)
# EXE-SYM-NEXT: Type: Function (0x2)
# EXE-SYM-NEXT: Other: 0
# EXE-SYM-NEXT: Section: .text (0x5)
# EXE-SYM-NEXT: }
# EXE-SYM: Symbol {
# EXE-SYM: Name: S1 (4)
# EXE-SYM-NEXT: Value: 0x{{[0-9A-F]+}}
# EXE-SYM-NEXT: Size: 4
# EXE-SYM-NEXT: Binding: Global (0x1)
# EXE-SYM-NEXT: Type: Function (0x2)
# EXE-SYM-NEXT: Other: 128
# EXE-SYM-NEXT: Section: .text (0x5)
# EXE-SYM-NEXT: }
# EXE-DSYM-NOT: Name: S1 (4)
# micro.o
---
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Size: 0x08
Symbols:
Global:
- Name: S0
Type: STT_FUNC
Section: .text
Size: 0x04
Value: 0x00
Visibility: STV_DEFAULT
Other: [ ]
- Name: S1
Type: STT_FUNC
Section: .text
Size: 0x04
Value: 0x04
Visibility: STV_DEFAULT
Other: [ STO_MIPS_MICROMIPS ]
...