[PATCH] D23201: [ELF] - Fix for: error "invalid section index: xxx" when linking FreeBSD kernel.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 02:17:54 PDT 2016
grimar added inline comments.
================
Comment at: ELF/InputFiles.cpp:345
@@ -344,3 +344,3 @@
InputSectionBase<ELFT> *S = Sections[Index];
- if (S == &InputSectionBase<ELFT>::Discarded)
+ if (!S || S == &InputSectionBase<ELFT>::Discarded)
return S;
----------------
ruiu wrote:
> This is not a good place to fix it. Set InputSectionBase<ELFT>::Discarded to REL/RELA sections instead.
Ok, BTW, it also touches .shstrtab, .symtab, .strtab sections in originall issue.
I updated testcase and code.
https://reviews.llvm.org/D23201
More information about the llvm-commits
mailing list