ruiu added inline comments. ================ Comment at: ELF/Writer.cpp:294 + // commands. + OutputSections.clear(); + ---------------- The only thing we have below is writeMapFile, so it's probably too late to do this. I'd move this up or remove. https://reviews.llvm.org/D33327