On Thu, 2012-07-26 at 15:58 -0700, Roland McGrath wrote:
As I've said, what I want to see first is just changing readelf.c
et al to
use the known-dwarf.h macros in their private functions. That can easily
take the form of readelf.c containing exactly the function definitions that
you intend to break out into exported libdw functions. Then the later step
will just be moving unchanged code from one file to another.
I collapsed the remaining (non-test) patches into two like these.
(I also pushed a quick fix for some broken code after I pushed the
earlier out-of-order patches, I missed a small dependency that broke the
build, sorry.)
This also incorporates other feedback. All new functions are now in
their own file. dwarf_lang_description has been dropped, readelf now
just uses dwarf_lang_string and no longer prints unknown_foobar_0xbeeb,
the context should make clear which unknown code it is (it does have the
unknown prefix to make clear the code is really unknown, and not just a
bare hex number), all new functions in libdw.h now use explicit extern.
Both patches attached. Patches for the testcase to follow.
Cheers,
Mark