# Check R_MIPS_PC21_S2 relocation overflow handling. # RUN: yaml2obj -format=elf %s > %t.o # RUN: not lld -flavor gnu -target mipsel -shared -o %t.exe %t.o 2>&1 \ # RUN: | FileCheck %s # CHECK: Relocation out of range in file {{.*}} reference from T0+0 to T1+4194300 of type 60 (R_MIPS_PC21_S2) FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R6] Sections: - Name: .text Type: SHT_PROGBITS Content: "ffff0f000000000000000000" # ^ T1 # ^ T0 A := 0xfffff AddressAlign: 16 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] - Name: .rel.text Type: SHT_REL Info: .text AddressAlign: 4 Relocations: - Offset: 0 Symbol: T1 Type: R_MIPS_PC21_S2 Symbols: Global: - Name: T0 Section: .text Type: STT_FUNC Value: 0 Size: 8 - Name: T1 Section: .text Type: STT_FUNC Value: 8 Size: 4