forked from OSchip/llvm-project
[yaml2obj][ELF] Ensure STN_UNDEF entry is present.
llvm-svn: 184258
This commit is contained in:
parent
d60a41d941
commit
abe18db268
|
@ -12,7 +12,6 @@ Sections:
|
|||
- Name: .symtab
|
||||
Type: SHT_SYMTAB
|
||||
Symbols:
|
||||
- Name: "" # TODO: Add STN_UNDEF automatically.
|
||||
- Name: main
|
||||
|
||||
# CHECK: Symbols [
|
||||
|
|
|
@ -154,7 +154,12 @@ static void handleSymtabSectionHeader(
|
|||
SHeader.sh_entsize = sizeof(Elf_Sym);
|
||||
|
||||
std::vector<Elf_Sym> Syms;
|
||||
// FIXME: Ensure STN_UNDEF entry is present.
|
||||
{
|
||||
// Ensure STN_UNDEF is present
|
||||
Elf_Sym Sym;
|
||||
zero(Sym);
|
||||
Syms.push_back(Sym);
|
||||
}
|
||||
for (unsigned i = 0, e = Sec.Symbols.size(); i != e; ++i) {
|
||||
const ELFYAML::Symbol &Sym = Sec.Symbols[i];
|
||||
Elf_Sym Symbol;
|
||||
|
|
Loading…
Reference in New Issue