James C. McPherson wrote:
On 20/07/10 05:28 PM, Shawn Walker wrote:
...
There's some code pkg(5) uses for limited elf analysis in the pkg(5)
gate that is designed to interface with python:
http://src.opensolaris.org/source/xref/pkg/gate/src/modules/elf.c
http://src.opensolaris.org/source/xref/pkg/gate/src/modules/elfextract.c
I don't know how much you need, but maybe it can get you by...
Hey, that might just work!
I'll bounce it off Rod and Ali....
Rod/Ali - do you reckon we could make use of the pkg-gate elf
modules to help re-write wsdiff to do less calling out to userland?
thanks,
James C. McPherson
--
Oracle
http://www.jmcp.homeunix.com/blog
I did a quick read of those two links above. It looks pretty
reasonable to me. However, I have a couple of questions about it.
When it reads the dynamic section, it seems to focus only on
selected tags that it has an interest in. I wonder if wsdiff would
need to see all the tags? As a diff tool, I think it probably does.
It looks like the data for all the sections other than the dynamic
are simply extracted as binary blobs. I believe that wsdiff relies on
elfdump to render sections like symbol tables into symbolic (text) form,
and then compare those. I wonder if that makes a difference to the
diff operation --- presumably wsdiff would have also done a simple
binary diff if there was no reason to do the other work. It might be
that the textual comparison can tell that a symbol table has the same
symbols in a different order, or something like that.
We're also open to ideas for elfdump to make it more wsdiff-friendly.
I'm guessing that the cost of a single invocation of elfdump isn't
the bottleneck when compared to the cost of running it multiple times.
Do you have a sense of how bad elfdump's overhead is?
- Ali
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org