mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 12:02:58 +02:00
952158c13d
GNU's --strip-all doesn't strip as aggressively as it could in general. Currently llvm-objcopy copies the exact behavoir of GNU's --strip-all. eu-strip is used as a drop in replacement for GNU strip/objcopy in many many places without issue. eu-strip removes non-allocated sections and keeps .gnu.warning* sections. Because --strip-all will likely be the most widely used stripping option we should make --strip-all as aggressive as it can safely be. Since we have evidence from eu-strip that this is a safe option we should allow it. For those that might still have an issue afterwards I've added --strip-all-gnu as an exact drop in replacement for GNU's --strip-all as well. llvm-svn: 319071
30 lines
764 B
Plaintext
30 lines
764 B
Plaintext
# RUN: yaml2obj %s > %t
|
|
# RUN: llvm-objcopy --strip-all %t %t2
|
|
# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s
|
|
|
|
!ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .bss
|
|
Type: SHT_NOBITS
|
|
Flags: [ SHF_ALLOC ]
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
- Name: .blarg
|
|
Type: SHT_PROGBITS
|
|
Flags: [ ]
|
|
- Name: .gnu.warning.foo
|
|
Type: SHT_PROGBITS
|
|
|
|
# CHECK: SectionHeaderCount: 5
|
|
|
|
# CHECK: Name: .bss
|
|
# CHECK: Name: .text
|
|
# CHECK: Name: .gnu.warning.foo
|
|
# CHECK: Name: .shstrtab
|