1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/tools/obj2yaml
Georgii Rymar f954f43df3 [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list.
Imagine we have a YAML declaration of few sections: `foo1`, `<unnamed 2>`, `foo3`, `foo4`.

To put them into segment we can do (1*):

```
Sections:
 - Section: foo1
 - Section: foo4
```

or we can use (2*):

```
Sections:
 - Section: foo1
 - Section: foo3
 - Section: foo4
```

or (3*) :

```
Sections:
 - Section: foo1
## "(index 2)" here is a name that we automatically created for a unnamed section.
 - Section: (index 2)
 - Section: foo3
 - Section: foo4
```

It looks really confusing that we don't have to list all of sections.

At first I've tried to make this rule stricter and report an error when there is a gap
(i.e. when a section is included into segment, but not listed explicitly).
This did not work perfect, because such approach conflicts with unnamed sections/fills (see (3*)).

This patch drops "Sections" key and introduces 2 keys instead: `FirstSec` and `LastSec`.
Both are optional.

Differential revision: https://reviews.llvm.org/D90458
2020-11-09 13:00:50 +03:00
..
archive2yaml.cpp [yaml2obj][obj2yaml] - Teach tools to work with regular archives. 2020-10-28 15:27:11 +03:00
CMakeLists.txt [yaml2obj][obj2yaml] - Teach tools to work with regular archives. 2020-10-28 15:27:11 +03:00
coff2yaml.cpp
dwarf2yaml.cpp Fix debug_abbrev emitter to only assign table id once 2020-11-08 18:11:50 -08:00
elf2yaml.cpp [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
macho2yaml.cpp [obj2yaml] Stop parsing the debug_str section when it encounters a string without the null terminator. 2020-09-08 16:09:36 +08:00
minidump2yaml.cpp [obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files) 2020-08-26 14:25:11 +03:00
obj2yaml.cpp [yaml2obj][obj2yaml] - Teach tools to work with regular archives. 2020-10-28 15:27:11 +03:00
obj2yaml.h [yaml2obj][obj2yaml] - Teach tools to work with regular archives. 2020-10-28 15:27:11 +03:00
wasm2yaml.cpp [WebAssembly] Added .tabletype to asm and multiple table support in obj files 2020-10-13 07:52:23 -07:00
xcoff2yaml.cpp