Hello,
On Thu, 30 Jul 2015 12:18:42 -0700
Alex Stewart <
foo...@gmail.com> wrote:
> >
> > What's needed is a way to "diff" SDK lib by lib, object by
> > object.
>
>
> I've been thinking about this a bit.. Unfortunately, the more I think
> about it the harder it sounds..
>
> I don't think you could actually do this purely at the object-code
> level (for starters, simply locating/identifying all of the static
> (non-exported) functions is pretty difficult without disassembling
> everything first, but more importantly, if somebody just
> added/removed a function or a data object it could potentially change
> memory offsets for all kinds of other stuff, resulting in different
> opcodes being produced, and potentially different binary
> representations for other functions whose code hasn't changed at
> all)..
Yes, that's why I talked about some high-level measure of differences,
using some heuristic, e.g. size of functions. I don't know how well
that would work, but common sense says that on an incrementally
elaborated project it should work. Of course, any "global" change, like
different compiler optimization switches, would throw it off, but then
probably still leaving correlation with the previous results.
Btw, I had a look at libraries supplied with 1.2.0 "RAM optimization"
patch and they feature dramatical decrease in raw object byte size.
Didn't try to figure what may been involved.
I also started writing a "map file diff" utility I mentioned, but so far
that's backlogged.
> You can actually already do some level of this sort of thing by
> combining xtobjdis with diff, though (using --nohex and doing a
> little bit of post-processing to avoid false-positives due to
> addresses and autogenerated label names changing, etc).. As a quick
> hack, I've modified a script I made a little bit back (which I'd also
> been meaning to post for a while) to unpack and disassemble a whole
> set of SDK libs at once, and now also put together a 'sdk-diff'
> script which unpacks and disassembles two different sets of SDK libs
> and then runs them through diff in this manner. It's not perfect,
> but for a really quick first pass, it's actually not a bad start for
> identifying what's different between two versions of things, I think..
>
> I've put the sdk-diff script (and a few other tools I've hacked up
> during my RE work, including the 'unpack' script, etc) up at
>
https://bitbucket.org/foogod/esp8266-re-tools for anybody who wants
> to play with it..
Thanks Alex, I wanted to ask actually how you manage various lists in
wiki - it doesn't seem to be practical to do everything by hand, and I
see you have some helper scripts there, thanks for sharing, it helps
understand methodology better.
This sdk-diff script also looks interesting. I'm however backlogged
with other stuff and vacations, so it will take me some time to get
back to this and other esp8266-re matters.
>
> --Alex
>
[]