diff options
author | Sean Silva <silvas@purdue.edu> | 2013-06-18 23:19:17 +0000 |
---|---|---|
committer | Sean Silva <silvas@purdue.edu> | 2013-06-18 23:19:17 +0000 |
commit | ca0170ffa1ba6d53f0008b345cb5ac777e81c3b1 (patch) | |
tree | 4d5dda9aea00f34259ae20eec8718ac111999076 /tools/yaml2obj | |
parent | afcf60fe15999ea07193118f447a34f41171e433 (diff) | |
download | llvm-ca0170ffa1ba6d53f0008b345cb5ac777e81c3b1.tar.gz llvm-ca0170ffa1ba6d53f0008b345cb5ac777e81c3b1.tar.bz2 llvm-ca0170ffa1ba6d53f0008b345cb5ac777e81c3b1.tar.xz |
[yaml2obj][ELF] Ensure STN_UNDEF entry is present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/yaml2obj')
-rw-r--r-- | tools/yaml2obj/yaml2elf.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp index bebcbde256..a67a275bf9 100644 --- a/tools/yaml2obj/yaml2elf.cpp +++ b/tools/yaml2obj/yaml2elf.cpp @@ -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; |