diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2021-01-25 13:56:54 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2021-01-28 10:51:52 +0300 |
commit | 68195b15a36c338751b7abe28819345617dd70fb (patch) | |
tree | 8f4edefb9f021df4a411b4d40f425ead35bdc459 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | fc8e7411218c846386650cfba111b62827c71da0 (diff) | |
download | llvm-68195b15a36c338751b7abe28819345617dd70fb.zip llvm-68195b15a36c338751b7abe28819345617dd70fb.tar.gz llvm-68195b15a36c338751b7abe28819345617dd70fb.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions