50 lines · plain
1# RUN: yaml2obj %s -o %t.o2# RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s3 4# Checks that ICF does not merge 2 sections the type of5# the relocations of which differ.6 7# CHECK-NOT: selected8 9!ELF10FileHeader:11 Class: ELFCLASS6412 Data: ELFDATA2LSB13 OSABI: ELFOSABI_FREEBSD14 Type: ET_REL15 Machine: EM_X86_6416Sections:17 - Type: SHT_PROGBITS18 Name: .text19 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]20 AddressAlign: 0x0421 Content: "0000000000000000"22 - Name: .text.foo23 Type: SHT_PROGBITS24 Flags: [ SHF_ALLOC, SHF_EXECINSTR]25 Content: "FFFFFFFFFFFFFFFF"26 - Name: .text.bar27 Type: SHT_PROGBITS28 Flags: [ SHF_ALLOC, SHF_EXECINSTR]29 Content: "FFFFFFFFFFFFFFFF"30 - Name: .rela.text.foo31 Type: SHT_RELA32 Link: .symtab33 Info: .text.foo34 Relocations:35 - Type: R_X86_64_NONE36 - Name: .rela.text.bar37 Type: SHT_RELA38 Link: .symtab39 Info: .text.bar40 Relocations:41 - Symbol: zed42 Type: R_X86_64_6443Symbols:44 - Name: zed45 Type: STT_FUNC46 Section: .text47 Value: 0x048 Size: 849 Binding: STB_GLOBAL50