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() {
1219
1219
1220
1220
// Handle non-COMMON defined symbol below. !sym.file allows a symbol
1221
1221
// 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)
1224
1223
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
+ }
1225
1232
1226
- if (LLVM_UNLIKELY (secIdx == SHN_XINDEX))
1227
- secIdx = check (getExtendedSymbolTableIndex<ELFT>(eSym, i, shndxTable));
1228
- else if (secIdx >= SHN_LORESERVE)
1229
- secIdx = 0 ;
1230
1233
if (LLVM_UNLIKELY (secIdx >= sections.size ()))
1231
1234
Fatal (ctx) << this << " : invalid section index: " << secIdx;
1232
1235
InputSectionBase *sec = sections[secIdx];
You can’t perform that action at this time.
0 commit comments