]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/icf10.test
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / icf10.test
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 offset of
5 # the relocations of which differ.
6
7 # CHECK-NOT: selected
8
9 !ELF
10 FileHeader:
11   Class:           ELFCLASS64
12   Data:            ELFDATA2LSB
13   OSABI:           ELFOSABI_FREEBSD
14   Type:            ET_REL
15   Machine:         EM_X86_64
16 Sections:
17   - Name:            .text.foo
18     Type:            SHT_PROGBITS
19     Flags:           [ SHF_ALLOC, SHF_EXECINSTR]
20     Content:         "FFFFFFFFFFFFFFFF"
21   - Name:            .text.bar
22     Type:            SHT_PROGBITS
23     Flags:           [ SHF_ALLOC, SHF_EXECINSTR]
24     Content:         "FFFFFFFFFFFFFFFF"
25   - Name:            .rela.text.foo
26     Type:            SHT_RELA
27     Link:            .symtab
28     Info:            .text.foo
29     Relocations:
30       - Offset:          0x0000000000000000
31         Symbol:          ''
32         Type:            R_X86_64_NONE
33   - Name:            .rela.text.bar
34     Type:            SHT_RELA
35     Link:            .symtab
36     Info:            .text.bar
37     Relocations:
38       - Offset:          0x0000000000000001
39         Symbol:          ''
40         Type:            R_X86_64_NONE