1# RUN: yaml2obj %s -o %t.o 2# RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s 3 4# Checks that ICF does not merge 2 sections the type of 5# the relocations of which differ. 6 7# CHECK-NOT: selected 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 - Type: SHT_PROGBITS 18 Name: .text 19 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 20 AddressAlign: 0x04 21 Content: "0000000000000000" 22 - Name: .text.foo 23 Type: SHT_PROGBITS 24 Flags: [ SHF_ALLOC, SHF_EXECINSTR] 25 Content: "FFFFFFFFFFFFFFFF" 26 - Name: .text.bar 27 Type: SHT_PROGBITS 28 Flags: [ SHF_ALLOC, SHF_EXECINSTR] 29 Content: "FFFFFFFFFFFFFFFF" 30 - Name: .rela.text.foo 31 Type: SHT_RELA 32 Link: .symtab 33 Info: .text.foo 34 Relocations: 35 - Type: R_X86_64_NONE 36 - Name: .rela.text.bar 37 Type: SHT_RELA 38 Link: .symtab 39 Info: .text.bar 40 Relocations: 41 - Symbol: zed 42 Type: R_X86_64_64 43Symbols: 44 - Name: zed 45 Type: STT_FUNC 46 Section: .text 47 Value: 0x0 48 Size: 8 49 Binding: STB_GLOBAL 50