diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-11-24 15:41:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-11-24 15:43:51 -0500 |
commit | 4e25ac038efbe5293885cc75d8a3e08b23da7cc9 (patch) | |
tree | 9d229bb7ece3584f33b3f9124703331cc0ddc534 /binutils | |
parent | 0fbc35681ff0825be97802efcccf953bc4573a45 (diff) | |
download | gdb-4e25ac038efbe5293885cc75d8a3e08b23da7cc9.zip gdb-4e25ac038efbe5293885cc75d8a3e08b23da7cc9.tar.gz gdb-4e25ac038efbe5293885cc75d8a3e08b23da7cc9.tar.bz2 |
Revert "elf: Properly compute offsets of note descriptor and next note"
This reverts commit 650444eb540f9fd85e821567a3f943b4bc41b8be.
With this patch, running the GDB test case gdb.base/auxv.exp is stuck in
an infinite loop, consuming memory to the point that it renders the
machine unusable. I am reverting it so we can take our time to
investigate while not killing all the developers' machines.
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 eab6830..32df4b9 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 739367d..5944ebe 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 { |