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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 14:27:26 PST 2017


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.

Thanks,
Rafael


More information about the llvm-commits mailing list