Fix a bug that MIPS thunks can overwrite other section contents.
Peter Smith found while trying to support thunk creation for ARM that LLD sometimes creates broken thunks for MIPS. The cause of the bug is that we assign file offsets to input sections too early. We need to create all sections and then assign section offsets because appending thunks changes file offsets for all following sections. This patch separates the pass to assign file offsets from thunk creation pass. This effectively reverts r265673. Differential Revision: http://reviews.llvm.org/D21598 llvm-svn: 273532
Loading
Please register or sign in to comment