[PATCH] D25016: [ELF] - Fixed assert fail when symbol table has invalid sh_info value.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 10:34:00 PDT 2016
ruiu added a comment.
Out of curiosity, why do you want to do this? Did you find an object file broken this way?
================
Comment at: ELF/InputFiles.cpp:84
@@ -83,3 +83,3 @@
uint32_t FirstNonLocal = Symtab->sh_info;
- if (FirstNonLocal > NumSymbols)
+ if (!FirstNonLocal || (FirstNonLocal > NumSymbols))
fatal(getFilename(this) + ": invalid sh_info in symbol table");
----------------
Probably `FirstNonLocal == 0` is better as we all know that 0 is not a valid symbol index.
https://reviews.llvm.org/D25016
More information about the llvm-commits
mailing list