File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1219,14 +1219,17 @@ template <class ELFT> void ObjFile<ELFT>::postParse() {
12191219
12201220 // Handle non-COMMON defined symbol below. !sym.file allows a symbol
12211221 // assignment to redefine a symbol without an error.
1222- if (!sym.file || !sym.isDefined () || secIdx == SHN_UNDEF ||
1223- secIdx == SHN_COMMON)
1222+ if (!sym.file || !sym.isDefined () || secIdx == SHN_UNDEF)
12241223 continue ;
1224+ if (LLVM_UNLIKELY (secIdx >= SHN_LORESERVE)) {
1225+ if (secIdx == SHN_COMMON)
1226+ continue ;
1227+ if (secIdx == SHN_XINDEX)
1228+ secIdx = check (getExtendedSymbolTableIndex<ELFT>(eSym, i, shndxTable));
1229+ else
1230+ secIdx = 0 ;
1231+ }
12251232
1226- if (LLVM_UNLIKELY (secIdx == SHN_XINDEX))
1227- secIdx = check (getExtendedSymbolTableIndex<ELFT>(eSym, i, shndxTable));
1228- else if (secIdx >= SHN_LORESERVE)
1229- secIdx = 0 ;
12301233 if (LLVM_UNLIKELY (secIdx >= sections.size ()))
12311234 Fatal (ctx) << this << " : invalid section index: " << secIdx;
12321235 InputSectionBase *sec = sections[secIdx];
You can’t perform that action at this time.
0 commit comments