-# 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
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 {}