[PATCH] D36812: Add support for writing 64-bit symbol tables for archives when offsets become too large for 32-bit

Roland McGrath via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 15:12:42 PDT 2017


GNU nm has the -s/--print-armap switch to dump the index.  You could
implement that and then use it to test archive contents.

On Mon, Oct 23, 2017 at 2:40 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Jake Ehrlich via Phabricator <reviews at reviews.llvm.org> writes:
>
> > Index: test/Object/archive-SYM64-write.test
> > ===================================================================
> > --- /dev/null
> > +++ test/Object/archive-SYM64-write.test
> > @@ -0,0 +1,27 @@
> > +# RUN: yaml2obj %s > %t
> > +# RUN: rm -f %t.lib
> > +# RUN: llvm-ar cr %t.lib %t
> > +# RUN: mv %t %t2
> > +# RUN: llvm-ar cr %t.lib %t2 %p/Inputs/trivial-object-test.elf-x86-64
> > +# RUN: llvm-nm %t.lib | FileCheck %s
>
> Why do you need to create the new library in two steps?
>
> As written the test would pass without the patch, no? The produced
> symbol table would be broken, but we don't test that it is not.
>
> Not sure what is the best way to test that in llvm itself. All I can
> think of is checking for /SYM64 or writing a unit test.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171023/2206c31f/attachment.html>


More information about the llvm-commits mailing list