summaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-04-26 14:23:26 +0100
committerNick Clifton <nickc@redhat.com>2017-04-26 14:23:26 +0100
commit3e6b644558f941d3fe482e15efbc53d8f39ef8b7 (patch)
tree1fc8a414d8e72c7136562a5e449fd93f8a70f2e1 /binutils/testsuite
parentb41c5a85a734b9ca813d4a314b66ef4b4b4d1b11 (diff)
Improve decoding of corrupt/unrecognised gnu build attribute notes.
* readelf.c (process_section_headers): Warn about overlarge sections. (print_gnu_build_attribute_name): Print the number of unrecognised note types. Fix formatting in the presence of errors. (testsuite/binutils-all/note-2-32.s): Fix encoding of numeric notes. (testsuite/binutils-all/note-2-64.s): Likewise.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/binutils-all/note-2-32.s32
-rw-r--r--binutils/testsuite/binutils-all/note-2-64.s34
2 files changed, 28 insertions, 38 deletions
diff --git a/binutils/testsuite/binutils-all/note-2-32.s b/binutils/testsuite/binutils-all/note-2-32.s
index da3b08536a..9aed3df346 100644
--- a/binutils/testsuite/binutils-all/note-2-32.s
+++ b/binutils/testsuite/binutils-all/note-2-32.s
@@ -17,23 +17,21 @@ note1.s:
.dc.l 0x100
.asciz "$gcc 7.0.1"
- .dc.l 2
+ .dc.l 3
.dc.l 0
.dc.l 0x100
- .dc.b 0x2b, 0x2
- .dc.b 0, 0
+ .dc.b 0x2b, 0x2, 0
+ .dc.b 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x100
- .dc.b 0x2a, 0x7, 0
- .dc.b 0
+ .dc.b 0x2a, 0x7, 0, 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x100
- .dc.b 0x2a, 0x6, 0
- .dc.b 0
+ .dc.b 0x2a, 0x6, 0, 0
.popsection
@@ -55,23 +53,21 @@ func1:
.dc.l 0x100
.asciz "$gcc 7.0.1"
- .dc.l 2
+ .dc.l 3
.dc.l 0
.dc.l 0x100
- .dc.b 0x21, 0x2
- .dc.b 0, 0
+ .dc.b 0x21, 0x2, 0
+ .dc.b 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x101
- .dc.b 0x2a, 0x7, 1
- .dc.b 0
+ .dc.b 0x2a, 0x7, 1, 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x100
- .dc.b 0x2a, 0x6, 0
- .dc.b 0
+ .dc.b 0x2a, 0x6, 0, 0
.popsection
.global note3.s
diff --git a/binutils/testsuite/binutils-all/note-2-64.s b/binutils/testsuite/binutils-all/note-2-64.s
index fcd61d0337..885e947760 100644
--- a/binutils/testsuite/binutils-all/note-2-64.s
+++ b/binutils/testsuite/binutils-all/note-2-64.s
@@ -17,23 +17,21 @@ note1.s:
.dc.l 0x100
.asciz "$gcc 7.0.1"
- .dc.l 2
+ .dc.l 3
.dc.l 0
.dc.l 0x100
- .dc.b 0x2b, 0x2
- .dc.b 0, 0
+ .dc.b 0x2b, 0x2, 0
+ .dc.b 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x100
- .dc.b 0x2a, 0x7, 0
- .dc.b 0
+ .dc.b 0x2a, 0x7, 0, 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x100
- .dc.b 0x2a, 0x6, 0
- .dc.b 0
+ .dc.b 0x2a, 0x6, 0, 0
.popsection
@@ -56,23 +54,21 @@ func1:
.dc.l 0x100
.asciz "$gcc 7.0.1"
- .dc.l 2
+ .dc.l 3
.dc.l 0
.dc.l 0x100
- .dc.b 0x21, 0x2
- .dc.b 0, 0
+ .dc.b 0x21, 0x2, 0
+ .dc.b 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x101
- .dc.b 0x2a, 0x7, 1
- .dc.b 0
+ .dc.b 0x2a, 0x7, 1, 0
- .dc.l 3
+ .dc.l 4
.dc.l 0
.dc.l 0x100
- .dc.b 0x2a, 0x6, 0
- .dc.b 0
+ .dc.b 0x2a, 0x6, 0, 0
.popsection
@@ -93,5 +89,3 @@ note3.s:
.asciz "$gcc 7.0.1"
.popsection
-
-