[PATCH] D34668: llvm-nm: Add suport for symbol demangling (-C/--demangle)

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 11:27:24 PDT 2017


On Thu, Jun 29, 2017 at 11:19 AM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Sam Clegg <sbc at chromium.org> writes:
> >> MachO isn't the only target with a prefix of '_'. Shouldn't this be
> >> inspecting `DataLayout::getGlobalPrefix()` for that instead?
> >>
> >>
> >
> > I didnt't know about that.  Any idea how I would go about getting a
> > DataLayout object?  Seems like its linked to the IR system and nm is
> > working with libObject binaries.
>
> I don't think you can in general. Lets handle just MachO for now.
>
> Given that the .bc file now has a symbol table, it would be really nice
> to refactor the libraries so that llvm-nm is not a 16 MB binary (and
> there would never be a DataLayout in it).
>

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.

Thanks,
-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/31871cf1/attachment.html>


More information about the llvm-commits mailing list