summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-arm-attributes.test
blob: 2dcca66df1a629c1ba2e03ce8cba441da38e705b (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
## This test makes sure that --strip-all and --strip-all-gnu preserve
## .ARM.attributes sections in ELF files. This is needed to maintain
## compatibility for Ubuntu/Debian distributions on ARM.

# RUN: yaml2obj %s > %t
# RUN: llvm-objcopy --strip-all %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
# RUN: llvm-objcopy --strip-all-gnu %t %t3
# RUN: llvm-readobj --sections %t3 | FileCheck %s
# RUN: llvm-strip %t -o %t4
# RUN: cmp %t4 %t2
# RUN: llvm-strip --strip-all-gnu %t -o %t5
# RUN: cmp %t5 %t3

!ELF
FileHeader:
  Class:           ELFCLASS32
  Data:            ELFDATA2LSB
  Type:            ET_DYN
  Machine:         EM_ARM
Sections:
  - Name:            .ARM.attributes
    Type:            SHT_ARM_ATTRIBUTES

# CHECK: Name: .ARM.attributes
OpenPOWER on IntegriCloud