# Check handling of R_AARCH64_ADR_PREL_PG_HI21 relocation. # RUN: yaml2obj -format=elf %s > %t-obj # RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj # CHECK: Relocation out of range in file {{.*}}: reference from _start+0 to data1+1048577 of type 274 (R_AARCH64_ADR_PREL_LO21) !ELF FileHeader: !FileHeader Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_AARCH64 Sections: - Name: .text Type: SHT_PROGBITS Content: "00000090" AddressAlign: 16 Flags: [SHF_ALLOC, SHF_EXECINSTR] - Name: .data Type: SHT_PROGBITS Content: "00000000" AddressAlign: 16 Flags: [SHF_ALLOC, SHF_WRITE] - Name: .rela.text Type: SHT_RELA Info: .text AddressAlign: 8 Relocations: - Offset: 0x0 Symbol: data1 Type: R_AARCH64_ADR_PREL_LO21 Addend: 0x100001 Symbols: Global: - Name: _start Section: .text Value: 0x0 Size: 4 - Name: data1 Section: .data Size: 8