[lld] r304182 - Replace a few more uses of OutputSections.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon May 29 18:36:48 PDT 2017
Author: rafael
Date: Mon May 29 20:36:48 2017
New Revision: 304182
URL: http://llvm.org/viewvc/llvm-project?rev=304182&view=rev
Log:
Replace a few more uses of OutputSections.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=304182&r1=304181&r2=304182&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon May 29 20:36:48 2017
@@ -1717,7 +1717,7 @@ template <class ELFT> void Writer<ELFT>:
EHdr->e_ehsize = sizeof(Elf_Ehdr);
EHdr->e_phnum = Phdrs.size();
EHdr->e_shentsize = sizeof(Elf_Shdr);
- EHdr->e_shnum = OutputSections.size() + 1;
+ EHdr->e_shnum = OutputSectionCommands.size() + 1;
EHdr->e_shstrndx = InX::ShStrTab->OutSec->SectionIndex;
if (Config->EMachine == EM_ARM)
@@ -1749,8 +1749,8 @@ template <class ELFT> void Writer<ELFT>:
// Write the section header table. Note that the first table entry is null.
auto *SHdrs = reinterpret_cast<Elf_Shdr *>(Buf + EHdr->e_shoff);
- for (OutputSection *Sec : OutputSections)
- Sec->writeHeaderTo<ELFT>(++SHdrs);
+ for (OutputSectionCommand *Cmd : OutputSectionCommands)
+ Cmd->Sec->writeHeaderTo<ELFT>(++SHdrs);
}
// Open a result file.
More information about the llvm-commits
mailing list