diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 7 | ||||
-rw-r--r-- | binutils/readelf.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 32df4b9..eab6830 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +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 5944ebe..739367d 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -17969,9 +17969,13 @@ process_notes_at (Filedata * filedata, inote.namesz = BYTE_GET (external->namesz); inote.namedata = external->name; inote.descsz = BYTE_GET (external->descsz); - inote.descdata = inote.namedata + align_power (inote.namesz, 2); + inote.descdata = ((char *) external + + ELF_NOTE_DESC_OFFSET (inote.namesz, + section->sh_addralign)); inote.descpos = offset + (inote.descdata - (char *) pnotes); - next = inote.descdata + align_power (inote.descsz, 2); + next = ((char *) external + + ELF_NOTE_NEXT_OFFSET (inote.namesz, inote.descsz, + section->sh_addralign)); } else { |