Index: ELF/Writer.cpp =================================================================== --- ELF/Writer.cpp +++ ELF/Writer.cpp @@ -1320,20 +1320,11 @@ if (!Out::BuildId) return; - // Compute a hash of all sections except .debug_* sections. - // We skip debug sections because they tend to be very large - // and their contents are very likely to be the same as long as - // other sections are the same. + // Compute a hash of all sections. uint8_t *Start = Buffer->getBufferStart(); - uint8_t *Last = Start; + uint8_t *End = Start + FileSize; std::vector> Regions; - for (OutputSectionBase *Sec : OutputSections) { - uint8_t *End = Start + Sec->getFileOff(); - if (!Sec->getName().startswith(".debug_")) - Regions.push_back({Last, End}); - Last = End; - } - Regions.push_back({Last, Start + FileSize}); + Regions.push_back({Start, End}); Out::BuildId->writeBuildId(Regions); }