1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/ObjectYAML
Georgii Rymar 441aa2949d [yaml2obj] - Allow empty SectionHeaderTable definitions.
Currently we don't allow the following definition:

```
Sections:
  - Type: SectionHeaderTable
  - Name: .foo
    Type: SHT_PROGBITS
```

We report an error: "SectionHeaderTable can't be empty. Use 'NoHeaders' key to drop the section header table".

It was implemented in this way earlier, when `SectionHeaderTable`
was a dedicated key outside of the `Sections` list. And we did not
allow to select where the table is written.

Currently it makes sense to allow it, because a user might
want to place the default section header table at an arbitrary position,
e.g. before other sections. In this case it is not convenient and error prone
to require specifying all sections:

```
Sections:
  - Type: SectionHeaderTable
    Sections:
      - Name: .foo
      - Name: .strtab
      - Name: .shstrtab
  - Name: .foo
    Type: SHT_PROGBITS
```

This patch allows empty SectionHeaderTable definitions.

Differential revision: https://reviews.llvm.org/D95341
2021-01-28 10:51:52 +03:00
..
ArchiveEmitter.cpp
ArchiveYAML.cpp
CMakeLists.txt
CodeViewYAMLDebugSections.cpp
CodeViewYAMLSymbols.cpp
CodeViewYAMLTypeHashing.cpp
CodeViewYAMLTypes.cpp
COFFEmitter.cpp [llvm] Don't include StringSwitch.h where unnecessary (NFC) 2021-01-21 19:59:48 -08:00
COFFYAML.cpp
DWARFEmitter.cpp [llvm] Populate std::vector at construction time (NFC) 2021-01-18 10:16:33 -08:00
DWARFYAML.cpp
ELFEmitter.cpp [yaml2obj] - Allow empty SectionHeaderTable definitions. 2021-01-28 10:51:52 +03:00
ELFYAML.cpp [yaml2obj] - Allow empty SectionHeaderTable definitions. 2021-01-28 10:51:52 +03:00
MachOEmitter.cpp [llvm] Populate std::vector at construction time (NFC) 2021-01-18 10:16:33 -08:00
MachOYAML.cpp
MinidumpEmitter.cpp
MinidumpYAML.cpp
ObjectYAML.cpp
WasmEmitter.cpp [WebAssembly] Change prefix on data segment flags to WASM_DATA_SEGMENT 2021-01-19 09:40:42 +01:00
WasmYAML.cpp [WebAssembly] Change prefix on data segment flags to WASM_DATA_SEGMENT 2021-01-19 09:40:42 +01:00
XCOFFYAML.cpp
yaml2obj.cpp
YAML.cpp