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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 13:22:07 PST 2017


Danek Duvall <danek.duvall at oracle.com> writes:

> Rafael Avila de Espindola wrote:
>
>> Danek Duvall <danek.duvall at oracle.com> writes:
>> > 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.
>> 
>> Since the archive format is basically text, I think you can just use
>> FileCheck to test that we create a symbol table on an empty file. Take a
>> look at llvm/test/Object/archive-format.test. In fact, don't you have to
>> update that test with your patch?
>
> I don't -- the problem only appears when there's an actual object file in
> the archive, not when the archive is empty or contains only text files.
>
> So I figured out how to use yaml2obj to create a minimal object file.  I
> couldn't figure out how to get FileCheck to deal with null characters, so I
> used cat -v instead of cat.  Perhaps that last check line isn't strictly
> necessary, since the previous line had a 4 in place of the 8 that should be
> there, but it's a bit more clear what's going on this way.  I'm happy to
> change it, if you don't feel it's necessary or cat -v isn't portable enough.
>
> I also moved the test into archive-format.test, since it seemed like a
> reasonable place for it.

I would probably avoid "cat -v" if not strictly required. The patch
looks good with that change.

Do you need me to commit it?

Thanks,
Rafael


More information about the llvm-commits mailing list