<div dir="ltr">GNU nm has the -s/--print-armap switch to dump the index.  You could implement that and then use it to test archive contents.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 23, 2017 at 2:40 PM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Jake Ehrlich via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> writes:<br>
<br>
> Index: test/Object/archive-SYM64-<wbr>write.test<br>
> ==============================<wbr>==============================<wbr>=======<br>
> --- /dev/null<br>
> +++ test/Object/archive-SYM64-<wbr>write.test<br>
> @@ -0,0 +1,27 @@<br>
> +# RUN: yaml2obj %s > %t<br>
> +# RUN: rm -f %t.lib<br>
> +# RUN: llvm-ar cr %t.lib %t<br>
> +# RUN: mv %t %t2<br>
> +# RUN: llvm-ar cr %t.lib %t2 %p/Inputs/trivial-object-test.<wbr>elf-x86-64<br>
</span>> +# RUN: llvm-nm %t.lib | FileCheck %s<br>
<br>
Why do you need to create the new library in two steps?<br>
<br>
As written the test would pass without the patch, no? The produced<br>
symbol table would be broken, but we don't test that it is not.<br>
<br>
Not sure what is the best way to test that in llvm itself. All I can<br>
think of is checking for /SYM64 or writing a unit test.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>