[PATCH] D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 04:13:10 PDT 2017


ikudrin added inline comments.


================
Comment at: ELF/Relocations.cpp:1087
+                                    : PrevIS->OutSecOff + PrevIS->getSize();
+            addThunkSection(OS, ISR, ThunkOff);
+            NeedTrailingTS = false;
----------------
As now you create Thunk sections in advance, it is possible that they stay empty when `ThunkCreator::mergeThunks()` is called. In that case, it might call `getTargetInputSection()` on an empty `ThunkSections`, which, on its turn, calls `front()` on an empty vector `Thunks`.


https://reviews.llvm.org/D34689





More information about the llvm-commits mailing list