Fixes for new dw5 test
authorAlan Modra <amodra@gmail.com>
Fri, 24 Feb 2017 13:28:50 +0000 (23:58 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 25 Feb 2017 08:43:23 +0000 (19:13 +1030)
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.

binutils/ChangeLog
binutils/testsuite/binutils-all/dw5.S
binutils/testsuite/binutils-all/readelf.exp

index 200490283bad634668651c1f5b85605620fef051..a615361f1b3680c0c100cdcb28e0b8e81299ff74 100644 (file)
@@ -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,
index 83bb6396412a2fa6e1b2d17766116545226f9544..2f754618f16fb0c0022d888566341177ae3e357a 100644 (file)
@@ -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
index 10f2b7a1b62567b4d7c5e6b915fbb7f30d815f8e..d9e437d967756c4f891fcdec5c6ee6c6337bed64 100644 (file)
@@ -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
This page took 0.028858 seconds and 4 git commands to generate.