[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / section-symbols.test
blob74ed7ab6888bfc69fbf11b686150b30698088b1d
1 # RUN: yaml2obj %s -o %t
2 # RUN: ld.lld -shared %t -o /dev/null
4 # Verify that lld can handle STT_SECTION symbols associated
5 # with SHT_REL[A]/SHT_SYMTAB/SHT_STRTAB sections.
7 !ELF
8 FileHeader:
9   Class:           ELFCLASS64
10   Data:            ELFDATA2LSB
11   OSABI:           ELFOSABI_FREEBSD
12   Type:            ET_REL
13   Machine:         EM_X86_64
14 Sections:
15   - Name:            .text
16     Type:            SHT_PROGBITS
17     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
18     AddressAlign:    0x0000000000000010
19     Content:         "00000000"
20   - Name:            .rela.text
21     Type:            SHT_RELA
22     Link:            .symtab
23     AddressAlign:    0x0000000000000008
24     Info:            .text
25     Relocations:
26 Symbols:
27   - Type:            STT_SECTION
28     Section:         .rela.text
29   - Type:            STT_SECTION
30     Section:         .shstrtab
31   - Type:            STT_SECTION
32     Section:         .symtab
33   - Type:            STT_SECTION
34     Section:         .strtab