forked from OSchip/llvm-project
58 lines
1.3 KiB
Plaintext
58 lines
1.3 KiB
Plaintext
# Check that LLD shows an error if ADDIUPC immediate is out of range.
|
|
|
|
# RUN: yaml2obj -format=elf %s > %t-obj
|
|
# RUN: env LLD_RUN_ROUNDTRIP_TEST= \
|
|
# RUN: lld -flavor gnu -target mipsel -o %t-exe %t-obj 2>&1 | FileCheck %s
|
|
|
|
# CHECK: The addiupc instruction immediate 0x02000008 is out of range
|
|
|
|
!ELF
|
|
FileHeader: !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
|
|
Content: "0000000080780100"
|
|
# ^ PC23: 1 << 2 = 4 => T0 + 4 - 4 = T0
|
|
AddressAlign: 16
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
|
|
- Name: .data
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC ]
|
|
AddressAlign: 0x04
|
|
Size: 0x4000000
|
|
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Info: .text
|
|
AddressAlign: 4
|
|
Relocations:
|
|
- Offset: 4
|
|
Symbol: T0
|
|
Type: R_MICROMIPS_PC23_S2
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: __start
|
|
Section: .text
|
|
Type: STT_FUNC
|
|
Size: 8
|
|
Other: [ STO_MIPS_MICROMIPS ]
|
|
- Name: TZ
|
|
Section: .data
|
|
Type: STT_FUNC
|
|
Value: 0
|
|
Size: 0x2000000
|
|
- Name: T0
|
|
Section: .data
|
|
Type: STT_FUNC
|
|
Value: 0x2000000
|
|
Size: 4
|