# Check R_MIPS_HI16 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 T0+0 to _gp_disp+2147483648 of type 5 (R_MIPS_HI16) FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32] Sections: - Name: .text Type: SHT_PROGBITS Content: "0080000000000000" # ^ %hi(gp+0x80000000) # ^ %lo(gp+0x80000000) AddressAlign: 16 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] - Name: .rel.text Type: SHT_REL Info: .text AddressAlign: 4 Relocations: - Offset: 0x0 Symbol: _gp_disp Type: R_MIPS_HI16 - Offset: 0x4 Symbol: _gp_disp Type: R_MIPS_LO16 Symbols: Global: - Name: T0 Section: .text Type: STT_FUNC Value: 0 Size: 8 - Name: _gp_disp