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

Danek Duvall via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 12:59:12 PDT 2017


Rafael Avila de Espindola wrote:

> Danek Duvall <danek.duvall at oracle.com> writes:
> 
> > Danek Duvall wrote:
> >
> >> Rafael Avila de Espindola wrote:
> >> 
> >> > 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.
> >> 
> >> I couldn't figure out how to make it work without cat -v, other than
> >> dropping that last checked line of output.
> >> 
> >> > Do you need me to commit it?
> >> 
> >> Yes, please.
> >
> > Is there anything else you need from me on this?  Do you want me to re-send
> > a patch without the cat -v?
> 
> No, sorry, I can do the rest. It just slip with me being busy with
> something else, sorry.

No worries.

> Committing it in a minute.

Thank you so much!

Danek


More information about the llvm-commits mailing list