Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions llvm/lib/ObjCopy/COFF/COFFWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ Error COFFWriter::finalizeSymIdxContents() {
for (Symbol &Sym : Obj.getMutableSymbols()) {
SymIdMap[Sym.OriginalRawIndex] = Sym.RawIndex;

// We collect only definition symbols of the sections to update checksum.
// We collect only definition symbols of the sections to update the
// checksums.
if (Sym.Sym.StorageClass == IMAGE_SYM_CLASS_STATIC &&
Sym.Sym.NumberOfAuxSymbols == 1 && Sym.Sym.Value == 0 &&
IsSymIdxSection(Sym.Name))
Expand All @@ -126,8 +127,8 @@ Error COFFWriter::finalizeSymIdxContents() {
continue;

ArrayRef<uint8_t> RawIds = Sec.getContents();
// Nothing to do and also CheckSum will be -1 instead of 0 if we recalculate
// it on empty input.
// Nothing to do and also the checksum will be -1 instead of 0 if we
// recalculate it on empty input.
if (RawIds.size() == 0)
continue;

Expand All @@ -154,7 +155,7 @@ Error COFFWriter::finalizeSymIdxContents() {
}
ArrayRef<uint8_t> NewRawIds(reinterpret_cast<uint8_t *>(NewIds.data()),
RawIds.size());
// Update check sum.
// Update the checksum.
JamCRC JC(/*Init=*/0);
JC.update(NewRawIds);
SecDefIt->getSecond()->CheckSum = JC.getCRC();
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading