diff options
author | George Rimar <grimar@accesssoftek.com> | 2019-06-10 11:38:06 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2019-06-10 11:38:06 +0000 |
commit | 379aa18a39584e6956e9ebd9d574310eb4c731ba (patch) | |
tree | 3b91a24a856d572d5b7f62219fb26251f5521212 /llvm/lib/ObjectYAML/ELFYAML.cpp | |
parent | d847aa573b655fe71aad323c7f579c6302c702aa (diff) | |
download | bcm5719-llvm-379aa18a39584e6956e9ebd9d574310eb4c731ba.tar.gz bcm5719-llvm-379aa18a39584e6956e9ebd9d574310eb4c731ba.zip |
[yaml2obj] - Do not assert when .dynsym is specified explicitly, but .dynstr is not present.
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
Diffstat (limited to 'llvm/lib/ObjectYAML/ELFYAML.cpp')
0 files changed, 0 insertions, 0 deletions