forked from OSchip/llvm-project
150 lines
3.3 KiB
Plaintext
150 lines
3.3 KiB
Plaintext
# Check generation of .MIPS.abiflags section under the following conditions:
|
|
# - There are multiple input object files
|
|
# - Every input file has valid .MIPS.abiflags section
|
|
# - All .MIPS.abiflags sections are compatible with each other
|
|
#
|
|
# The .MIPS.abiflags section in the output file should reproduce result
|
|
# of merging input object file sections.
|
|
|
|
# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o
|
|
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o
|
|
# RUN: yaml2obj -format=elf -docnum 3 %s > %t3.o
|
|
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t1.o %t2.o %t3.o
|
|
# RUN: llvm-readobj -mips-abi-flags %t.so | FileCheck %s
|
|
|
|
# CHECK: MIPS ABI Flags {
|
|
# CHECK-NEXT: Version: 0
|
|
# CHECK-NEXT: ISA: MIPS32r2
|
|
# CHECK-NEXT: ISA Extension: None (0x0)
|
|
# CHECK-NEXT: ASEs [ (0x810)
|
|
# CHECK-NEXT: MDMX (0x10)
|
|
# CHECK-NEXT: microMIPS (0x800)
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: FP ABI: Hard float (double precision) (0x1)
|
|
# CHECK-NEXT: GPR size: 32
|
|
# CHECK-NEXT: CPR1 size: 64
|
|
# CHECK-NEXT: CPR2 size: 0
|
|
# CHECK-NEXT: Flags 1 [ (0x1)
|
|
# CHECK-NEXT: ODDSPREG
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: Flags 2: 0x0
|
|
# CHECK-NEXT: }
|
|
|
|
# o1.o
|
|
---
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32,
|
|
EF_MIPS_ARCH_32, EF_MIPS_ARCH_ASE_MDMX]
|
|
|
|
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: 1
|
|
ISAExtension: EXT_NONE
|
|
ASEs: [ MDMX ]
|
|
FpABI: FP_DOUBLE
|
|
GPRSize: REG_32
|
|
CPR1Size: REG_64
|
|
CPR2Size: REG_NONE
|
|
Flags1: [ ]
|
|
Flags2: 0x0
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: T1
|
|
Section: .text
|
|
Type: STT_FUNC
|
|
Value: 0
|
|
Size: 4
|
|
|
|
# o2.o
|
|
---
|
|
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: [ODDSPREG]
|
|
Flags2: 0x0
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: T2
|
|
Section: .text
|
|
Type: STT_FUNC
|
|
Value: 0
|
|
Size: 4
|
|
|
|
# o3.o
|
|
---
|
|
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: T3
|
|
Section: .text
|
|
Type: STT_FUNC
|
|
Value: 0
|
|
Size: 4
|
|
...
|