# Check R_MIPS_GPREL16 relocation overflow handling. # # RUN: yaml2obj -format=elf %s > %t.o # RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o 2>&1 \ # RUN: | FileCheck %s # CHECK: Relocation out of range in file {{.*}} reference from +0 to T1+-32768 of type 7 (R_MIPS_GPREL16) FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32] Sections: - Type: SHT_PROGBITS Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 4 Size: 4 - Type: SHT_PROGBITS Name: .rodata Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] AddressAlign: 4 Content: 00800000 - Type: SHT_REL Name: .rel.rodata Type: SHT_REL Link: .symtab Info: .rodata AddressAlign: 4 Relocations: - Offset: 0 Symbol: T1 Type: R_MIPS_GPREL16 Symbols: Global: - Name: T1 Section: .text Value: 0 Size: 4