mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
a46ae2d5c4
We have a code in buildSectionIndex() that adds implicit sections: // Add special sections after input sections, if necessary. for (StringRef Name : implicitSectionNames()) if (SN2I.addName(Name, SecNo)) { // Account for this section, since it wasn't in the Doc ++SecNo; DotShStrtab.add(Name); } The problem arises when .dynsym is specified explicitly and no DynamicSymbols is used. In that case, we do not add .dynstr implicitly and will assert later when will try to set Link for .dynsym. Seems, in this case, reasonable behavior is to allow Link field to be zero. This is what this patch does. Differential revision: https://reviews.llvm.org/D63001 llvm-svn: 362929