Better HN
topnewbestaskshowjobs
Log inSign up

throwabob412

4 karma · joined Feb 18, 2015 (11y ago) · 1 submissions

Submissions

comment 11y ago · link · parent

pahole is fantastic. If it worked on modern clang-generated binaries, it would still be the best. This entire article could be replaced with "use pahole."

Anyway, the problem with pahole is that it is heavily dependent on libdwarves, a custom wrapper around libdwarf by the pahole author. libdwarves has bitrotted since 2010-2011 and newer dwarf extensions produce aborts. Hurray.

I started a similar tool in C just using libdwarf directly. It's not complete and/or perfect, but it works on some binaries that pahole does not. See https://github.com/cemeyer/structhole . (And it's < 500 LoC and BSD-licensed. Please use as you will and contribute patches if you are interested in improving it.) Cheers.