On Wed, 2019-04-03 at 11:48 -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Apr 03, 2019 at 04:05:06PM +0200, Mark Wielaard escreveu: > > On Wed, 2019-04-03 at 10:19 -0300, Arnaldo Carvalho de Melo wrote: > > > Most are false positives, as DWARF (let alone BTF) has explicit > > > ways > > > to tell that these are all __attribute__((aligned(something)) and > > > pahole still don't infer those by realizing that its not a > > > natural > > > alignment, a heuristic that would catch most of these bigger > > > holes, > > > such as: > > > > DWARF does have DW_AT_alignment and GCC8 does output it. > > Excellent! So it is GCC that first used it? I just checked GCC 7.3.1 and it also emits it. It was added by Alexandre Oliva two years ago: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63238 > > [ 37] member abbrev: 4 > > name (string) "i" > > decl_file (data1) align.c (1) > > decl_line (data1) 3 > > decl_column (data1) 40 > > type (ref4) [ 5c] > > HERE => alignment (data1) 64 > > data_member_location (data1) 40 Also urgh eu-readelf... It prints the data_member_location as hex, but all other constants as decimal... That is super confusing. Just posted a patch: https://sourceware.org/ml/elfutils-devel/2019-q2/msg00003.html Cheers, Mark