libdwfl: Make sure note data is properly aligned.
authorMark Wielaard <mark@klomp.org>
Sat, 18 Dec 2021 01:01:37 +0000 (02:01 +0100)
committerMark Wielaard <mark@klomp.org>
Sat, 18 Dec 2021 01:23:44 +0000 (02:23 +0100)
commitb16ff8198f91714048faaaed2a9b4e6801293226
tree59da18ee5d2599434dc0319b75890fa7689b353a
parentcdf407ef36378ba623c97f9c5c454666f45771fd
libdwfl: Make sure note data is properly aligned.

In dwfl_segment_report_module the note data might not be properly
aligned. Check that it is before accessing the data directly.
Otherwise convert data so it is properly aligned.

Also fix NOTE_ALIGN4 and NOTE_ALIGN8 to work correctly with long
types.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdwfl/ChangeLog
libdwfl/dwfl_segment_report_module.c
libelf/ChangeLog
libelf/libelfP.h