| 1 |
# llvm-objcopy's --strip-sections removes the section headers. It should be |
| 2 |
# possible to run the tool on the output after this operation. Performing any |
| 3 |
# subsequent stripping operation, or copying the object, should produce |
| 4 |
# identical output. |
| 5 |
|
| 6 |
# RUN: yaml2obj %s -o %t.in |
| 7 |
# RUN: llvm-objcopy %t.in %t.stripped --strip-sections |
| 8 |
# RUN: llvm-objcopy %t.stripped %t.stripped2 --strip-sections |
| 9 |
# RUN: llvm-objcopy %t.stripped2 %t.out |
| 10 |
# RUN: cmp %t.stripped %t.stripped2 |
| 11 |
# RUN: cmp %t.stripped %t.out |
| 12 |
|
| 13 |
--- !ELF |
| 14 |
FileHeader: |
| 15 |
Class: ELFCLASS64 |
| 16 |
Data: ELFDATA2LSB |
| 17 |
Type: ET_EXEC |
| 18 |
Machine: EM_X86_64 |
| 19 |
Sections: |
| 20 |
- Name: .text |
| 21 |
Type: SHT_PROGBITS |
| 22 |
Content: 'facefeed' |
| 23 |
ProgramHeaders: |
| 24 |
- Type: PT_LOAD |
| 25 |
FirstSec: .text |
| 26 |
LastSec: .text |