1# REQUIRES: x86 2# RUN: yaml2obj %s -o %t1.o 3# RUN: echo ".global foo; foo:" > %t2.s 4# RUN: llvm-mc %t2.s -o %t2.o -filetype=obj -triple x86_64-pc-linux 5# RUN: not ld.lld %t1.o %t2.o -o /dev/null 2>&1 | FileCheck %s 6# CHECK: error: unknown relocation (152) against symbol foo 7# CHECK: error: unknown relocation (153) against symbol foo 8 9!ELF 10FileHeader: 11 Class: ELFCLASS64 12 Data: ELFDATA2LSB 13 OSABI: ELFOSABI_FREEBSD 14 Type: ET_REL 15 Machine: EM_X86_64 16Sections: 17 - Name: .text 18 Type: SHT_PROGBITS 19 Flags: [ SHF_ALLOC ] 20 - Name: .rela.text 21 Type: SHT_RELA 22 Link: .symtab 23 Info: .text 24 Relocations: 25 - Symbol: foo 26 Type: 0x98 27 - Symbol: foo 28 Type: 0x99 29Symbols: 30 - Name: foo 31 Binding: STB_GLOBAL 32