forked from OSchip/llvm-project
93 lines
2.5 KiB
Plaintext
93 lines
2.5 KiB
Plaintext
# Check generation of .MIPS.abiflags section under the following conditions:
|
|
# - There is the only input object file
|
|
# - The input file has valid .MIPS.abiflags section
|
|
#
|
|
# The .MIPS.abiflags section in the output file should have the same
|
|
# settings as the input section.
|
|
|
|
# RUN: yaml2obj -format=elf %s > %t.o
|
|
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.o
|
|
# RUN: llvm-readobj -s -program-headers -mips-abi-flags %t.so | FileCheck %s
|
|
|
|
# CHECK: Section {
|
|
# CHECK: Index: 1
|
|
# CHECK-NEXT: Name: .MIPS.abiflags
|
|
# CHECK-NEXT: Type: SHT_MIPS_ABIFLAGS
|
|
# CHECK-NEXT: Flags [
|
|
# CHECK-NEXT: SHF_ALLOC
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: Address: 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: Offset: 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: Size: 24
|
|
# CHECK-NEXT: Link: 0
|
|
# CHECK-NEXT: Info: 0
|
|
# CHECK-NEXT: AddressAlignment: 8
|
|
# CHECK-NEXT: EntrySize: 24
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK: ProgramHeaders [
|
|
# CHECK-NEXT: ProgramHeader {
|
|
# CHECK-NEXT: Type: PT_MIPS_ABIFLAGS (0x70000003)
|
|
# CHECK-NEXT: Offset: 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: VirtualAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: PhysicalAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: FileSize: 24
|
|
# CHECK-NEXT: MemSize: 24
|
|
# CHECK-NEXT: Flags [
|
|
# CHECK-NEXT: PF_R
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: Alignment: 8
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK: MIPS ABI Flags {
|
|
# CHECK-NEXT: Version: 0
|
|
# CHECK-NEXT: ISA: MIPS32r2
|
|
# CHECK-NEXT: ISA Extension: None (0x0)
|
|
# CHECK-NEXT: ASEs [ (0x800)
|
|
# CHECK-NEXT: microMIPS (0x800)
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: FP ABI: Hard float (32-bit CPU, Any FPU) (0x5)
|
|
# CHECK-NEXT: GPR size: 32
|
|
# CHECK-NEXT: CPR1 size: 32
|
|
# CHECK-NEXT: CPR2 size: 0
|
|
# CHECK-NEXT: Flags 1 [ (0x0)
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: Flags 2: 0x0
|
|
# CHECK-NEXT: }
|
|
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
Size: 4
|
|
AddressAlign: 16
|
|
|
|
- Name: .MIPS.abiflags
|
|
Type: SHT_MIPS_ABIFLAGS
|
|
AddressAlign: 8
|
|
ISA: MIPS32
|
|
ISARevision: 2
|
|
ISAExtension: EXT_NONE
|
|
ASEs: [ MICROMIPS ]
|
|
FpABI: FP_XX
|
|
GPRSize: REG_32
|
|
CPR1Size: REG_32
|
|
CPR2Size: REG_NONE
|
|
Flags1: [ ]
|
|
Flags2: 0x0
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: T0
|
|
Section: .text
|
|
Type: STT_FUNC
|
|
Value: 0
|
|
Size: 4
|