aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test
blob: 00bb8fcf18205be4e3cfe5407994133b69c4acd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy --discard-locals %t %t2 2>&1 | FileCheck %s -DFILE=%t

!ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  Type:            ET_REL
  Machine:         EM_X86_64
Sections:
  - Name:            .text
    Type:            SHT_PROGBITS
  - Name:            .rel.text
    Type:            SHT_REL
    Link:            .symtab
    Info:            .text
    Relocations:
      - Offset: 0x1000
        Symbol: .L.rel
        Type:   R_X86_64_PC32
Symbols:
  - Name:     .L.rel
    Type:     STT_FUNC
    Section:  .text

# CHECK: error: '[[FILE]]': not stripping symbol '.L.rel' because it is named in a relocation