[PATCH] libelf: If xlate can only convert the ELF note header, just do that.
Sat May 4 19:54:00 GMT 2019
On Wed, May 01, 2019 at 12:04:17AM +0200, Mark Wielaard wrote:
> On Tue, Apr 30, 2019 at 01:24:48PM +0200, Mark Wielaard wrote:
> > When we started parsing new style ELF_T_NHDR8 notes we added extra
> > checks on alignment and padding. When those failed we would stop
> > converting and just return the rest of the ELF Note unconverted.
> > In the case were we just had enough data for just the ELF Note header
> > and the destionation and source weren't the same we would then
> > accidentially throw away the Note header conversion we just did.
> > Fix that by indicating we did correctly convert just the header.
> > Adds testcase that compares parsing ELF notes with gelf_getnote
> > and parsing the raw data by hand using elf32_xlatetom using just
> > the Note header and ignoring the (raw) note data.
> Here is a small update that adds a ChangeLog entry for the libelf
> change, and also updates the src and dest pointers so that things keep
> working even if the len is slightly larger than just the ELF Note
> header, but one of the alignment or padding sanity checks fails.
I pushed this update to master.
More information about the Elfutils-devel