[PATCH] archives require a symbol table on Solaris, even if empty

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 08:32:52 PST 2017


On Wed, Mar 8, 2017 at 4:50 PM, Danek Duvall via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> 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.
>>
>> Please include a testcase and port the patch to svn. Please also make
>> the description a bit more meaningful for outsiders by replacing 25243781
>> with which solaris tools are impacted.
>
> I've attached a new patch with an updated comment, a testcase, and an
> archive, with a git-style patch.  Let me know if there's a better way to do
> this.
>

You don't need to check in a binary to test this.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list