llvm.org GIT mirror llvm / 3a2d5b5
[ObjectYAML] Handle SHF_COMPRESSED This was previously being silently dropped by obj2yaml and caused parsing errors with yaml2obj. Differential Revision: https://reviews.llvm.org/D38490 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314768 91177308-0d34-0410-b5e6-96231b3b80d8 Shoaib Meenai 1 year, 11 months ago
2 changed file(s) with 29 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
449449 BCase(SHF_OS_NONCONFORMING);
450450 BCase(SHF_GROUP);
451451 BCase(SHF_TLS);
452 BCase(SHF_COMPRESSED);
452453 switch (Object->Header.Machine) {
453454 case ELF::EM_ARM:
454455 BCase(SHF_ARM_PURECODE);
0 # RUN: yaml2obj %s -o %t
1 # RUN: llvm-readobj -sections %t | FileCheck -check-prefix=OBJ %s
2 # RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
3
4 --- !ELF
5 FileHeader:
6 Class: ELFCLASS32
7 Data: ELFDATA2LSB
8 Type: ET_REL
9 Machine: EM_386
10 Sections:
11 - Name: .debug_line
12 Type: SHT_PROGBITS
13 Flags: [ SHF_COMPRESSED ]
14
15 # OBJ: Sections [
16 # OBJ: Section {
17 # OBJ: Index: 1
18 # OBJ-NEXT: Name: .debug_line (1)
19 # OBJ-NEXT: Type: SHT_PROGBITS (0x1)
20 # OBJ-NEXT: Flags [ (0x800)
21 # OBJ-NEXT: SHF_COMPRESSED (0x800)
22 # OBJ-NEXT: ]
23
24 # YAML: Sections:
25 # YAML-NEXT: - Name: .debug_line
26 # YAML-NEXT: Type: SHT_PROGBITS
27 # YAML-NEXT: Flags: [ SHF_COMPRESSED ]