# Check R_MICROMIPS_GPREL16 relocation overflow handling. # # RUN: yaml2obj -format=elf %s > %t.o # RUN: not lld -flavor 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 L0+0 of type 136 (R_MICROMIPS_GPREL16) # CHECK: Relocation out of range in file {{.*}} reference from +4 to G0+0 of type 136 (R_MICROMIPS_GPREL16) 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_32R2, EF_MIPS_MICROMIPS] Sections: - Type: SHT_PROGBITS Name: .text Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 4 Size: 8 - Type: SHT_PROGBITS Name: .rodata Flags: [ SHF_ALLOC ] AddressAlign: 4 Size: 8 - Type: SHT_REL Name: .rel.rodata Link: .symtab Info: .rodata AddressAlign: 4 Relocations: - Offset: 0 Symbol: L0 Type: R_MICROMIPS_GPREL16 - Offset: 4 Symbol: G0 Type: R_MICROMIPS_GPREL16 Symbols: Local: - Name: L0 Section: .text Value: 0 Size: 4 - Name: .rodata Type: STT_SECTION Section: .rodata Global: - Name: G0 Section: .text Value: 4 Size: 4