diff options
author | Nick Clifton <nickc@redhat.com> | 2012-02-01 15:44:30 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2012-02-01 15:44:30 +0000 |
commit | 8b971f9fe98d53e92ad7ca36a55c207eda5782aa (patch) | |
tree | 460e4f04ea01a8660fd52f9d02ba5192990cbc57 /binutils/testsuite | |
parent | bc884eba6a28fe7bf907df58f10ccb13989d6c5a (diff) | |
download | gdb-8b971f9fe98d53e92ad7ca36a55c207eda5782aa.zip gdb-8b971f9fe98d53e92ad7ca36a55c207eda5782aa.tar.gz gdb-8b971f9fe98d53e92ad7ca36a55c207eda5782aa.tar.bz2 |
PR binutils/13482
* readelf.c (process_corefile_note_segment): Fix off-by-one errors
verifying the contents of a note.
* binutils-all/version.s: New test source file.
* binutils-all/readelf.n: New file: expected readelf output.
* binutils-all/readelf.exp: Add test of .note section contents.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r-- | binutils/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/readelf.exp | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 2775719..ecf56b8 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-02-01 Nick Clifton <nickc@redhat.com> + + PR binutils/13482 + * binutils-all/version.s: New test source file. + * binutils-all/readelf.n: New file: expected readelf output. + * binutils-all/readelf.exp: Add test of .note section contents. For older changes see ChangeLog-0411 diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp index 8b68aec..e611cb2 100644 --- a/binutils/testsuite/binutils-all/readelf.exp +++ b/binutils/testsuite/binutils-all/readelf.exp @@ -1,4 +1,4 @@ -# Copyright 1999, 2000, 2001, 2003, 2004, 2007, 2009 +# Copyright 1999, 2000, 2001, 2003, 2004, 2007, 2009, 2012 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -337,3 +337,18 @@ readelf_wi_test readelf_compressed_wa_test readelf_dump_test + +# PR 13482 - Check for off-by-one errors when dumping .note sections. +if {![binutils_assemble $srcdir/$subdir/version.s tmpdir/version.o]} then { + perror "could not assemble version note test file" + unresolved "readelf - failed to assemble" + return +} + +if ![is_remote host] { + set tempfile tmpdir/version.o +} else { + set tempfile [remote_download host tmpdir/version.o] +} + +readelf_test -n $tempfile readelf.n {} |