1 ## Show that llvm-objcopy correctly updates the elf header and program header
2 ## table when they are within a segment.
4 # RUN: yaml2obj %s -o %t.in
5 ## Validate that the properties are different before the removal.
6 # RUN: llvm-readobj --file-headers --program-headers %t.in | FileCheck %s --check-prefix=BEFORE
7 # RUN: llvm-objcopy %t.in %t.out -R .remove_me
8 # RUN: llvm-readobj --file-headers --program-headers %t.out | FileCheck %s --check-prefix=AFTER
10 # BEFORE: SectionHeaderCount: 6
11 # BEFORE: Type: PT_LOAD
12 # BEFORE-NEXT: Offset: 0x0
13 # BEFORE: Type: PT_LOAD
14 # BEFORE-NEXT: Offset: 0xC0
16 # AFTER: SectionHeaderCount: 3
17 # AFTER: Type: PT_LOAD
18 # AFTER-NEXT: Offset: 0x0
19 # AFTER: Type: PT_LOAD
20 # AFTER-NEXT: Offset: 0xB0
38 FileSize: 176 # sizeof(Elf64_Ehdr) + 2 * sizeof(Elf64_Phdr)