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