From: Andrii Nakryiko <andriin@xxxxxx> This patchset fixes a bunch of issues with pahole --reorganize. It should be applied on top of previous patchset with various bitfield fixes. Patch #1 reverts the meaning of member->bit_hole and member->hole to mean "hole after member", which allows for easier adaptation of --reorganize. Patch #2 fixes small bug in class__find_holes() mis-categorizing byte hole as bit hole in certain circumstances. Patch #3 eliminates a lot of ad-hoc adjustments of holes in reorganize code and instead relies on re-calculation of them using class__find_holes(). Patch #4 makes sure class__find_holes() zeroes out bit_hole/hole from previous run. Andrii Nakryiko (4): dwarves: revert semantics of member bit/byte hole dwarves: fix classification of byte/bit hole for aligned bitfield reorganize: use class__find_holes() to recalculate holes class__find_holes: zero out bit_hole/hole on member dwarves.c | 18 +++++-- dwarves.h | 2 + dwarves_fprintf.c | 72 ++++++++++++++++--------- dwarves_reorganize.c | 123 ++++++++++++------------------------------- 4 files changed, 99 insertions(+), 116 deletions(-) -- 2.17.1