diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index f5a59f0c8c4d628bb9259a45d3a388e71943cf53..8c7a1e7ca010509ccf4b69621b0cc2224cede320 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1044,8 +1044,9 @@ template void OutputSectionCommand::writeTo(uint8_t *Buf) { Sec->Loc = Buf; - // We may have already rendered compressed content when using - // -compress-debug-sections option. Write it together with header. + // If -compress-debug-section is specified and if this is a debug seciton, + // we've already compressed section contents. If that's the case, + // just write it down. if (!Sec->CompressedData.empty()) { memcpy(Buf, Sec->ZDebugHeader.data(), Sec->ZDebugHeader.size()); memcpy(Buf + Sec->ZDebugHeader.size(), Sec->CompressedData.data(),