diff options
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 { |