[yaml2obj] - Add a technical prefix for each unnamed chunk.
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 14 May 2020 18:44:06 +0000 (21:44 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Sat, 23 May 2020 14:22:23 +0000 (17:22 +0300)
commit38c5d6f70060046bbbfec7491c7ba54a50fa5d16
tree33208ae9f459a5bb7ab05150bd5c32f238f759f7
parent10f0f98eac5b20796ae804a2df2a9d853d59d3bd
[yaml2obj] - Add a technical prefix for each unnamed chunk.

This change does not affect the produced binary.

In this patch I assign a technical suffix to each section/fill
(i.e. chunk) name when it is empty. It allows to simplify the code
slightly and improve error messages reported.

In the code we have the section to index mapping, SN2I, which is
globally used. With this change we can use it to map "empty"
names to indexes now, what is helpful.

Differential revision: https://reviews.llvm.org/D79984
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/test/tools/yaml2obj/ELF/custom-null-section.yaml
llvm/test/tools/yaml2obj/ELF/section-link.yaml