[PATCH] archives require a symbol table on Solaris, even if empty
Danek Duvall via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 16:05:18 PST 2017
Rafael Avila de Espindola wrote:
> Danek Duvall via llvm-commits <llvm-commits at lists.llvm.org> writes:
>
> > Index: ArchiveWriter.cpp
> > ===================================================================
> > --- ArchiveWriter.cpp (revision 297234)
> > +++ ArchiveWriter.cpp (working copy)
> > @@ -341,6 +341,10 @@
> > if (isBSDLike(Kind))
> > print32(Out, Kind, StringTable.size()); // byte count of the string table
> > Out << StringTable;
> > + // If there are no symbols, emit an empty symbol table, to satisfy Solaris
> > + // tools prior to the fix for 25243781.
> > + if (StringTable.size() == 0)
> > + print32(Out, Kind, 0);
>
> I am OK with this. As far as I know no tool complains about an empty
> table, so this should make us strictly more portable.
Great, thanks.
> Please include a testcase and port the patch to svn.
I need a little guidance for the testcase. I can't figure out how to use
either llvm-objdump or llvm-readobj to tell the difference between a "good"
archive and a "bad" archive, but I can take a "bad" archive and see if
"llvm-ar rs bad.a" changes it. Should I just check that archive in, into
the Inputs directory?
I'm also not sure what you mean by porting the patch to svn. I did an svn
diff in the repo to generate that patch; was there more I was supposed to
do?
> Please also make the description a bit more meaningful for outsiders by
> replacing 25243781 with which solaris tools are impacted.
Of course; that shouldn't have been there at all.
Thanks,
Danek
More information about the llvm-commits
mailing list