diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 7 | ||||
-rw-r--r-- | binutils/readelf.c | 8 |
2 files changed, 2 insertions, 13 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index eab683047e..32df4b98f7 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,10 +1,3 @@ -2017-11-24 H.J. Lu <hongjiu.lu@intel.com> - - PR binutils/22444 - * readelf.c (process_notes_at): Use ELF_NOTE_DESC_OFFSET to get - the offset of the note descriptor. Use ELF_NOTE_NEXT_OFFSET to - get the offset of the next note entry. - 2017-11-23 Pavel I. Kryukov <kryukov@frtk.ru> PR 22485 diff --git a/binutils/readelf.c b/binutils/readelf.c index 739367d899..5944ebee96 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -17969,13 +17969,9 @@ process_notes_at (Filedata * filedata, inote.namesz = BYTE_GET (external->namesz); inote.namedata = external->name; inote.descsz = BYTE_GET (external->descsz); - inote.descdata = ((char *) external - + ELF_NOTE_DESC_OFFSET (inote.namesz, - section->sh_addralign)); + inote.descdata = inote.namedata + align_power (inote.namesz, 2); inote.descpos = offset + (inote.descdata - (char *) pnotes); - next = ((char *) external - + ELF_NOTE_NEXT_OFFSET (inote.namesz, inote.descsz, - section->sh_addralign)); + next = inote.descdata + align_power (inote.descsz, 2); } else { |