[yaml2obj] - Support reading a content as an array of bytes using the new 'ContentArr...
authorGeorgii Rymar <grimar@accesssoftek.com>
Tue, 23 Jun 2020 08:16:19 +0000 (11:16 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 30 Jun 2020 09:13:23 +0000 (12:13 +0300)
commit64bae035ef8c1ca438c412310ef4f3906dd56b77
tree8e62bac446304c244aadc69c8fcbe9e87e0dbf2a
parent657c4ab39dc80f569f422d40347b97586c27b2ba
[yaml2obj] - Support reading a content as an array of bytes using the new 'ContentArray' key.

It implements the way to describe a section content using a multi line description. E.g:

```
- Name:         .foo
  Type:         SHT_PROGBITS
  ContentArray: [ 0x11, 0x22, 0x33, 0x44,                                ## .long 11223344
                  0x55, 0x66,                                            ## .short 5566.
                  0x77,                                                  ## .byte 0x77
                  0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00 ] ## .quad 0x8899aabbccddeeff
```

It was briefly discussed in D75123 thread previously.

Differential revision: https://reviews.llvm.org/D82366
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/yaml2obj/ELF/content-array.yaml [new file with mode: 0644]