From 681dafbb6c605b96b141accf428923076606ec9e Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Sat, 22 Jun 2013 01:37:55 +0000 Subject: [yaml2obj][ELF] Narrow parameter. The full ELFYAML::Section isn't needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184626 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/yaml2obj/yaml2elf.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/yaml2obj') diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp index 5ca52a2..82ff787 100644 --- a/tools/yaml2obj/yaml2elf.cpp +++ b/tools/yaml2obj/yaml2elf.cpp @@ -212,7 +212,7 @@ addSymbols(const std::vector &Symbols, ELFState &State, template static void handleSymtabSectionHeader( - const ELFYAML::Section &Sec, ELFState &State, + const ELFYAML::LocalGlobalWeakSymbols &Symbols, ELFState &State, typename object::ELFObjectFile::Elf_Shdr &SHeader) { typedef typename object::ELFObjectFile::Elf_Sym Elf_Sym; @@ -220,7 +220,7 @@ static void handleSymtabSectionHeader( // error for SHT_SYMTAB. SHeader.sh_link = State.getDotStrTabSecNo(); // One greater than symbol table index of the last local symbol. - SHeader.sh_info = Sec.Symbols.Local.size() + 1; + SHeader.sh_info = Symbols.Local.size() + 1; SHeader.sh_entsize = sizeof(Elf_Sym); std::vector Syms; @@ -230,9 +230,9 @@ static void handleSymtabSectionHeader( zero(Sym); Syms.push_back(Sym); } - addSymbols(Sec.Symbols.Local, State, Syms, ELF::STB_LOCAL); - addSymbols(Sec.Symbols.Global, State, Syms, ELF::STB_GLOBAL); - addSymbols(Sec.Symbols.Weak, State, Syms, ELF::STB_WEAK); + addSymbols(Symbols.Local, State, Syms, ELF::STB_LOCAL); + addSymbols(Symbols.Global, State, Syms, ELF::STB_GLOBAL); + addSymbols(Symbols.Weak, State, Syms, ELF::STB_WEAK); ContiguousBlobAccumulator &CBA = State.getSectionContentAccum(); writeVectorData(CBA.getOSAndAlignedOffset(SHeader.sh_offset), Syms); @@ -338,7 +338,7 @@ static int writeELF(raw_ostream &OS, const ELFYAML::Object &Doc) { // (and setting sh_offset and sh_size) when going through this branch // here. if (Sec.Type == ELFYAML::ELF_SHT(SHT_SYMTAB)) - handleSymtabSectionHeader(Sec, State, SHeader); + handleSymtabSectionHeader(Sec.Symbols, State, SHeader); SHeaders.push_back(SHeader); } -- cgit v1.1