<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 29, 2017 at 11:19 AM, 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="">Sam Clegg <<a href="mailto:sbc@chromium.org">sbc@chromium.org</a>> writes:<br>
>> MachO isn't the only target with a prefix of '_'. Shouldn't this be<br>
>> inspecting `DataLayout::getGlobalPrefix()<wbr>` for that instead?<br>
>><br>
>><br>
><br>
> I didnt't know about that. Any idea how I would go about getting a<br>
> DataLayout object? Seems like its linked to the IR system and nm is<br>
> working with libObject binaries.<br>
<br>
</span>I don't think you can in general. Lets handle just MachO for now.<br>
<br>
Given that the .bc file now has a symbol table, it would be really nice<br>
to refactor the libraries so that llvm-nm is not a 16 MB binary (and<br>
there would never be a DataLayout in it).<br></blockquote><div><br></div><div>That would be nice, but it might not be possible until we can drop backwards compatibility with bitcode files that might not have a symbol table. This may not happen for a while if I understand Apple's constraints on backwards compatibility correctly.</div></div><br clear="all"><div>Thanks,</div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div></div>