1# RUN: yaml2obj %s -o %t
2# RUN: not llvm-objcopy --discard-locals %t %t2 2>&1 | FileCheck %s
3
4!ELF
5FileHeader:
6  Class:           ELFCLASS64
7  Data:            ELFDATA2LSB
8  Type:            ET_REL
9  Machine:         EM_X86_64
10Sections:
11  - Name:            .text
12    Type:            SHT_PROGBITS
13  - Name:            .rel.text
14    Type:            SHT_REL
15    Link:            .symtab
16    Info:            .text
17    Relocations:
18      - Offset: 0x1000
19        Symbol: .L.rel
20        Type:   R_X86_64_PC32
21Symbols:
22  - Name:     .L.rel
23    Type:     STT_FUNC
24    Section:  .text
25
26# CHECK: not stripping symbol '.L.rel' because it is named in a relocation
27