aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2018-03-23 12:20:03 +0000
committerNick Clifton <nickc@redhat.com>2018-03-23 12:20:03 +0000
commit8fd75781892c7458702f72b3b9cb1927609716de (patch)
tree369c0f6703cb70a23747787aa20dd1cea653cbc8 /binutils/testsuite
parentf6c4d4b152a985f355cd1552ce01c99a589c936f (diff)
downloadgdb-8fd75781892c7458702f72b3b9cb1927609716de.zip
gdb-8fd75781892c7458702f72b3b9cb1927609716de.tar.gz
gdb-8fd75781892c7458702f72b3b9cb1927609716de.tar.bz2
Improve readelf's selection of a file start symbol when displaying a gnu build attribute.
* readelf.c (get_symbol_for_build_attribute): Skip ARM mapping symbols. (print_gnu_build_attribute_description): If no file start symbol could be found, look for one two bytes into the file. * testsuite/binutils-all/note-4-64.s: Set the address of the file start symbol to two bytes into the file. * testsuite/binutils-all/note-4-32.s: Likewise.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/binutils-all/note-4-32.d18
-rw-r--r--binutils/testsuite/binutils-all/note-4-32.s4
-rw-r--r--binutils/testsuite/binutils-all/note-4-64.s4
3 files changed, 13 insertions, 13 deletions
diff --git a/binutils/testsuite/binutils-all/note-4-32.d b/binutils/testsuite/binutils-all/note-4-32.d
index 567af90..6c9e98e 100644
--- a/binutils/testsuite/binutils-all/note-4-32.d
+++ b/binutils/testsuite/binutils-all/note-4-32.d
@@ -7,13 +7,13 @@
#...
Displaying notes found in: .gnu.build.attributes
[ ]+Owner[ ]+Data size[ ]+Description
-[ ]+GA\$<version>3p3[ ]+0x00000008[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110 \(note_4.s\)
-[ ]+GA\$<tool>gcc 7.2.1 20170915[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110
-[ ]+GA\*GOW:0x700[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110
-[ ]+GA\*<stack prot>off[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110
-[ ]+GA\*FORTIFY:0xff[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110
-[ ]+GA\*<PIC>PIC[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110
-[ ]+GA\!<short enum>false[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110
-[ ]+GA\*<ABI>0x[0-9a-f]+[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x100 to 0x110
-[ ]+GA\*<stack prot>strong[ ]+0x00000008[ ]+func[ ]+Applies to region from 0x108 to 0x10c.*
+[ ]+GA\$<version>3p3[ ]+0x00000008[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110 \(note_4.s\)
+[ ]+GA\$<tool>gcc 7.2.1 20170915[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110
+[ ]+GA\*GOW:0x700[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110
+[ ]+GA\*<stack prot>off[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110
+[ ]+GA\*FORTIFY:0xff[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110
+[ ]+GA\*<PIC>PIC[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110
+[ ]+GA\!<short enum>false[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110
+[ ]+GA\*<ABI>0x[0-9a-f]+[ ]+0x00000000[ ]+OPEN[ ]+Applies to region from 0x10. to 0x110
+[ ]+GA\*<stack prot>strong[ ]+0x00000008[ ]+func[ ]+Applies to region from 0x10. to 0x10c.*
#...
diff --git a/binutils/testsuite/binutils-all/note-4-32.s b/binutils/testsuite/binutils-all/note-4-32.s
index 09c5652..20d9e7b 100644
--- a/binutils/testsuite/binutils-all/note-4-32.s
+++ b/binutils/testsuite/binutils-all/note-4-32.s
@@ -1,6 +1,6 @@
.text
.org 0x100
-note_4.s:
+ .equiv note_4.s, . + 2
.dc.l 0
.dc.l 0
@@ -18,7 +18,7 @@ note_4.s_end:
.dc.l 8
.dc.l 0x100
.asciz "GA$3p3"
- .dc.l note_4.s
+ .dc.l note_4.s - 2
.dc.l note_4.s_end
.dc.l 23
diff --git a/binutils/testsuite/binutils-all/note-4-64.s b/binutils/testsuite/binutils-all/note-4-64.s
index 4f53298..1901682 100644
--- a/binutils/testsuite/binutils-all/note-4-64.s
+++ b/binutils/testsuite/binutils-all/note-4-64.s
@@ -1,6 +1,6 @@
.text
.org 0x100
-note_4.s:
+ .equiv note_4.s, . + 2
.dc.l 0
.dc.l 0
.dc.l 0
@@ -22,7 +22,7 @@ note_4.s_end:
.dc.l 16
.dc.l 0x100
.asciz "GA$3p3"
- .8byte note_4.s
+ .8byte note_4.s - 2
.8byte note_4.s_end
.dc.l 23