[PATCH] D38490: [ObjectYAML] Handle SHF_COMPRESSED

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 20:52:19 PDT 2017


smeenai created this revision.

This was previously being dropped.


https://reviews.llvm.org/D38490

Files:
  lib/ObjectYAML/ELFYAML.cpp
  test/tools/yaml2obj/shf-compressed.yaml


Index: test/tools/yaml2obj/shf-compressed.yaml
===================================================================
--- /dev/null
+++ test/tools/yaml2obj/shf-compressed.yaml
@@ -0,0 +1,23 @@
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-readobj -sections %t | FileCheck %s
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_386
+Sections:
+  - Name:            .debug_line
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_COMPRESSED ]
+    AddressAlign:    0x0000000000000001
+
+# CHECK:      Sections [
+# CHECK:        Section {
+# CHECK:          Index: 1
+# CHECK-NEXT:     Name: .debug_line (1)
+# CHECK-NEXT:     Type: SHT_PROGBITS (0x1)
+# CHECK-NEXT:     Flags [ (0x800)
+# CHECK-NEXT:       SHF_COMPRESSED (0x800)
+# CHECK-NEXT:     ]
Index: lib/ObjectYAML/ELFYAML.cpp
===================================================================
--- lib/ObjectYAML/ELFYAML.cpp
+++ lib/ObjectYAML/ELFYAML.cpp
@@ -450,6 +450,7 @@
   BCase(SHF_OS_NONCONFORMING);
   BCase(SHF_GROUP);
   BCase(SHF_TLS);
+  BCase(SHF_COMPRESSED);
   switch (Object->Header.Machine) {
   case ELF::EM_ARM:
     BCase(SHF_ARM_PURECODE);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38490.117467.patch
Type: text/x-patch
Size: 1207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171003/65040af8/attachment.bin>


More information about the llvm-commits mailing list