[Lldb-commits] Patch for Review: Linux split symbol support

Mike Sartain mikesart at valvesoftware.com
Thu Jun 13 18:13:27 PDT 2013


On Thursday, June 13, 2013 5:29 PM, Ed Maste [emaste at freebsd.org] wrote:

> I haven't yet reviewed the patch in detail, but as a general comment
> this isn't Linux-specific -- it's probably more correct to call it
> "ELF-y."  Specifically, it looks like this logic applies wholesale to
> FreeBSD, and linux/Symbols.cpp probably belongs in common/ instead.

I had it in Host/common/Symbols.cpp, but split it into a linux directory because that's how the macosx side currently exists. Happy to move it back to common though. If that's what folks what, I'll move it and leave it as ifdef'd __linux__ and let someone more familiar with freebsd make sure I didn't break anything on that platform.

> It seems unusual to dlopen libbfd to obtain a crc32; as far as I can
> see it's just a standard implementation.  You can probably grab an
> appropriate one from the FreeBSD source tree:
> http://svnweb.freebsd.org/base/head/sys/libkern/crc32.c?view=markup

The only spot I was aware of this code existing was in the gdb docs and code. For example, the bottom of this page:

http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

And that's all GPL I believe. I figured we would be ok using the libbfd shared library if it existed, so I went with that. It'd obviously be way better to get real code in there to do this as it's a fairly small algorithm. Your bsd version appears to produce the same results though - given the "do anything" comment at the top, I assume I can copy / paste it ObjectFileELF.cpp with appropriate credits?

Thanks much for the feedback Ed.
 -Mike



More information about the lldb-commits mailing list