Skip to content

Commit ee60009

Browse files
committed
Same symbols indices doesn't mean sections are good
1 parent 73186e3 commit ee60009

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

llvm/lib/ObjCopy/COFF/COFFWriter.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ Error COFFWriter::finalizeSymIdxContents() {
109109

110110
DenseMap<size_t, size_t> SymIdMap;
111111
SmallDenseMap<ssize_t, coff_aux_section_definition *, 4> SecIdMap;
112-
bool NeedUpdate = false;
113112
for (Symbol &Sym : Obj.getMutableSymbols()) {
114-
NeedUpdate |= Sym.OriginalRawIndex != Sym.RawIndex;
115113
SymIdMap[Sym.OriginalRawIndex] = Sym.RawIndex;
116114

117115
// We collect only definition symbols of the sections to update checksum.
@@ -123,9 +121,6 @@ Error COFFWriter::finalizeSymIdxContents() {
123121
Sym.AuxData[0].Opaque);
124122
}
125123

126-
if (!NeedUpdate)
127-
return Error::success();
128-
129124
for (Section &Sec : Obj.getMutableSections()) {
130125
if (!IsSymIdxSection(Sec.Name))
131126
continue;

0 commit comments

Comments
 (0)