mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
c58d77a269
This change adds support for removing sections using the -R field (as GNU objcopy does as well). This change should let us add many helpful tests and is a proper stepping stone for adding more general kinds of stripping. Differential Revision: https://reviews.llvm.org/D38260 llvm-svn: 315346
58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
# RUN: yaml2obj %s > %t
|
|
# RUN: llvm-objcopy -R .symtab %t %t2
|
|
# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s
|
|
|
|
!ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
|
|
#CHECK: SectionHeaderCount: 3
|
|
|
|
#CHECK: Sections [
|
|
#CHECK-NEXT: Section {
|
|
#CHECK-NEXT: Index: 0
|
|
#CHECK-NEXT: Name: (0)
|
|
#CHECK-NEXT: Type: SHT_NULL (0x0)
|
|
#CHECK-NEXT: Flags [ (0x0)
|
|
#CHECK-NEXT: ]
|
|
#CHECK-NEXT: Address: 0x0
|
|
#CHECK-NEXT: Offset: 0x0
|
|
#CHECK-NEXT: Size: 0
|
|
#CHECK-NEXT: Link: 0
|
|
#CHECK-NEXT: Info: 0
|
|
#CHECK-NEXT: AddressAlignment: 0
|
|
#CHECK-NEXT: EntrySize: 0
|
|
#CHECK-NEXT: }
|
|
#CHECK-NEXT: Section {
|
|
#CHECK-NEXT: Index: 1
|
|
#CHECK-NEXT: Name: .strtab
|
|
#CHECK-NEXT: Type: SHT_STRTAB (0x3)
|
|
#CHECK-NEXT: Flags [ (0x0)
|
|
#CHECK-NEXT: ]
|
|
#CHECK-NEXT: Address: 0x0
|
|
#CHECK-NEXT: Offset:
|
|
#CHECK-NEXT: Size: 1
|
|
#CHECK-NEXT: Link: 0
|
|
#CHECK-NEXT: Info: 0
|
|
#CHECK-NEXT: AddressAlignment: 1
|
|
#CHECK-NEXT: EntrySize: 0
|
|
#CHECK-NEXT: }
|
|
#CHECK-NEXT: Section {
|
|
#CHECK-NEXT: Index: 2
|
|
#CHECK-NEXT: Name: .shstrtab (1)
|
|
#CHECK-NEXT: Type: SHT_STRTAB (0x3)
|
|
#CHECK-NEXT: Flags [ (0x0)
|
|
#CHECK-NEXT: ]
|
|
#CHECK-NEXT: Address: 0x0
|
|
#CHECK-NEXT: Offset:
|
|
#CHECK-NEXT: Size:
|
|
#CHECK-NEXT: Link: 0
|
|
#CHECK-NEXT: Info: 0
|
|
#CHECK-NEXT: AddressAlignment: 1
|
|
#CHECK-NEXT: EntrySize: 0
|
|
#CHECK-NEXT: }
|
|
#CHECK-NEXT: ]
|