I changed the wording thus:
warning: abbrev 0x104b1c: unnecessary padding with zero bytes.
Please make this a uniform message for all the padding cases.
warning: excess zero padding in '.debug_abbrev' at offset 0x104b1c
so it exactly matches a msg for '.debug_str', etc.
A future refinement would be to just summarize with an "unnecessary zero
padding" or "nonzero bytes in unused portions" message per section (maybe
with a total byte count or something), and add an option to spit out a
message for every particular offsets.
I've also added --gnu option that Ulrich mentioned. (elflint has
--gnuld, but I expect the main culprit to be gcc in many cases, so I
generalized the option to --gnu). The above message is only printed in
That's fine for now. In the code, please make the particular checks keyed
on a finer-grained toggle, i.e. a "padding" switch or one per section.
As I mentioned earlier, we'll later line all those up with particular