From 1da971706e55edfe4e035e1795065364b9ae74c0 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 30 May 2017 01:36:48 +0000 Subject: [PATCH] Replace a few more uses of OutputSections. llvm-svn: 304182 --- lld/ELF/Writer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 72035365be26..7bb80f457301 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1717,7 +1717,7 @@ template void Writer::writeHeader() { 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 void Writer::writeHeader() { // Write the section header table. Note that the first table entry is null. auto *SHdrs = reinterpret_cast(Buf + EHdr->e_shoff); - for (OutputSection *Sec : OutputSections) - Sec->writeHeaderTo(++SHdrs); + for (OutputSectionCommand *Cmd : OutputSectionCommands) + Cmd->Sec->writeHeaderTo(++SHdrs); } // Open a result file.