aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-02-24 23:58:50 +1030
committerAlan Modra <amodra@gmail.com>2017-02-25 19:13:23 +1030
commit3b83ea38cfbc408da9c4a85a8db9a836fa098e93 (patch)
tree28f6cb7ee1b8292908f6b746e394edd64a1f9514
parent034fed0bbc3541d2a11a839faf4be521843ad954 (diff)
downloadgdb-3b83ea38cfbc408da9c4a85a8db9a836fa098e93.zip
gdb-3b83ea38cfbc408da9c4a85a8db9a836fa098e93.tar.gz
gdb-3b83ea38cfbc408da9c4a85a8db9a836fa098e93.tar.bz2
Fixes for new dw5 test
On some targets, .string does not add a NUL string terminator. * testsuite/binutils-all/dw5.S: Replace .string with .asciz. Support hpux .comm variant. * testsuite/binutils-all/readelf.exp: Define HPUX when assembling dw5 test for hppa64-hpux.
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/testsuite/binutils-all/dw5.S65
-rw-r--r--binutils/testsuite/binutils-all/readelf.exp6
3 files changed, 47 insertions, 31 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 2004902..a615361 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2017-02-25 Alan Modra <amodra@gmail.com>
+
+ * testsuite/binutils-all/dw5.S: Replace .string with .asciz.
+ Support hpux .comm variant.
+ * testsuite/binutils-all/readelf.exp: Define HPUX when assembling
+ dw5 test for hppa64-hpux.
+
2017-02-24 Nick Clifton <nickc@redhat.com>
* readelf.c (show_name, do_dynamic, do_syms, do_dyn_syms,
diff --git a/binutils/testsuite/binutils-all/dw5.S b/binutils/testsuite/binutils-all/dw5.S
index 83bb639..2f75461 100644
--- a/binutils/testsuite/binutils-all/dw5.S
+++ b/binutils/testsuite/binutils-all/dw5.S
@@ -55,8 +55,13 @@ main:
.dc.b 0
.LFE1:
.size main, .-main
+ .ifdef HPUX
+pvar .comm 8
+yvar .comm 4
+ .else
.comm pvar,8,8
.comm yvar,4,4
+ .endif
.globl xvar
.data
.align 4
@@ -615,65 +620,65 @@ xvar:
.LELT0:
.section .debug_str,"MS",%progbits,1
.LASF4:
- .string "unsigned int"
+ .asciz "unsigned int"
.LASF15:
- .string "optopt"
+ .asciz "optopt"
.LASF22:
- .string "main"
+ .asciz "main"
.LASF6:
- .string "signed char"
+ .asciz "signed char"
.LASF16:
- .string "xvar"
+ .asciz "xvar"
.LASF5:
- .string "long unsigned int"
+ .asciz "long unsigned int"
.LASF14:
- .string "opterr"
+ .asciz "opterr"
.LASF21:
- .string "GNU C11 7.0.1 20170218 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -O2"
+ .asciz "GNU C11 7.0.1 20170218 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -O2"
.LASF2:
- .string "unsigned char"
+ .asciz "unsigned char"
.LASF10:
- .string "char"
+ .asciz "char"
.LASF13:
- .string "optind"
+ .asciz "optind"
.LASF8:
- .string "long int"
+ .asciz "long int"
.LASF19:
- .string "argc"
+ .asciz "argc"
.LASF3:
- .string "short unsigned int"
+ .asciz "short unsigned int"
.LASF17:
- .string "yvar"
+ .asciz "yvar"
.LASF18:
- .string "pvar"
+ .asciz "pvar"
.LASF11:
- .string "__environ"
+ .asciz "__environ"
.LASF23:
- .string "func"
+ .asciz "func"
.LASF12:
- .string "optarg"
+ .asciz "optarg"
.LASF7:
- .string "short int"
+ .asciz "short int"
.LASF24:
- .string "alarm"
+ .asciz "alarm"
.LASF9:
- .string "sizetype"
+ .asciz "sizetype"
.LASF20:
- .string "argv"
+ .asciz "argv"
.section .debug_line_str,"MS",%progbits,1
.LASF1:
- .string ""
+ .asciz ""
.LASF25:
- .string ""
+ .asciz ""
.LASF29:
- .string "getopt.h"
+ .asciz "getopt.h"
.LASF28:
- .string "unistd.h"
+ .asciz "unistd.h"
.LASF0:
- .string "main.c"
+ .asciz "main.c"
.LASF27:
- .string "main.c"
+ .asciz "main.c"
.LASF26:
- .string "/usr/include"
+ .asciz "/usr/include"
.ident "GCC: (GNU) 7.0.1 20170218 (experimental)"
.section .note.GNU-stack,"",%progbits
diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp
index 10f2b7a..d9e437d 100644
--- a/binutils/testsuite/binutils-all/readelf.exp
+++ b/binutils/testsuite/binutils-all/readelf.exp
@@ -399,8 +399,12 @@ if {![binutils_assemble $srcdir/$subdir/z.s tmpdir/z.o]} then {
# support .ULEB128 pseudo-ops with non-constant values.
if ![istarget "riscv*-*-*"] then {
+ set hpux ""
+ if [istarget "hppa*64*-*-hpux*"] {
+ set hpux "--defsym HPUX=1"
+ }
# Assemble the DWARF-5 test file.
- if {![binutils_assemble $srcdir/$subdir/dw5.S tmpdir/dw5.o]} then {
+ if {![binutils_assemble_flags $srcdir/$subdir/dw5.S tmpdir/dw5.o $hpux]} then {
perror "could not assemble dw5 test file"
unresolved "readelf - failed to assemble dw5"
return