Fix PR binutils/26356 on hppa*-*-hpux*.
[deliverable/binutils-gdb.git] / binutils / testsuite / binutils-all / objcopy.exp
index 0eafcdbede165bae177092aa735203e89a6c64cc..9877f3d3107fd7b1f6c34a896f8b1d81744dd621 100644 (file)
@@ -76,7 +76,7 @@ proc objcopy_test {testname srcfile type asflags ldflags} {
            unresolved "objcopy $type ($testname)"
            return
        }
-       set xflags "-p"
+       set xflags "--preserve-dates"
     }
 
     set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS $xflags $t_tempfile $t_copyfile"]
@@ -117,7 +117,7 @@ setup_xfail "hppa*-*-*"
 setup_xfail "sh-*-coff*"
 setup_xfail "tic54x-*-*"
 clear_xfail "hppa*64*-*-hpux*" "hppa*-*-linux*" "hppa*-*-lites*"
-clear_xfail "hppa*-*-*n*bsd*" "hppa*-*-rtems*" "*-*-*elf*"
+clear_xfail "hppa*-*-*n*bsd*" "hppa*-*-rtems*" "hppa*-*-*elf*"
 objcopy_test "simple copy" bintest.s object "" ""
 
 # Test verilog data width
@@ -170,7 +170,11 @@ if { [file exists $tempfile] } {
     set reversed ${tempfile}-reversed
     set sect_names [get_standard_section_names]
     if { $sect_names != "" } {
-       set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -j [lindex $sect_names 1] --reverse-bytes=4 $tempfile $reversed"]
+       if { [istarget hppa*-*-hpux*] } {
+           set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -j \$PRIVATE\$ -j [lindex $sect_names 1] --reverse-bytes=4 $tempfile $reversed"]
+       } else {
+           set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -j [lindex $sect_names 1] --reverse-bytes=4 $tempfile $reversed"]
+       }
     } else {
        set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -j .data --reverse-bytes=4 $tempfile $reversed"]
     }
@@ -191,10 +195,6 @@ if { [file exists $tempfile] } {
        set found_rev [regexp -lineanchor $want $revdata -> revdata]
 
        if {$found_orig == 0 || $found_rev == 0} then {
-           # som doesn't have a .data section
-           setup_xfail "hppa*-*-hpux*"
-           clear_xfail "hppa*64*-*-hpux*"
-
            fail "objcopy --reverse-bytes"
        } else {
            scan $origdata "%2x%2x%2x%2x" b1 b2 b3 b4
@@ -1112,7 +1112,7 @@ if [is_elf_format] {
     setup_xfail "sh-*-coff*"
     setup_xfail "tic54x-*-*"
     clear_xfail "hppa*64*-*-hpux*" "hppa*-*-linux*" "hppa*-*-lites*"
-    clear_xfail "hppa*-*-*n*bsd*" "hppa*-*-rtems*" "*-*-*elf*"
+    clear_xfail "hppa*-*-*n*bsd*" "hppa*-*-rtems*" "hppa*-*-*elf*"
     objcopy_test "ELF unknown section type" unknown.s object "" ""
 
     objcopy_test_readelf "ELF group 1" group.s
@@ -1345,7 +1345,16 @@ run_dump_test "set-section-alignment"
 
 setup_xfail "hppa*-*-*"
 setup_xfail "sh-*-coff*"
-setup_xfail "mips-*-irix" "mipstx39-*-*" "spu-*-*"
+setup_xfail "spu-*-*"
 clear_xfail "hppa*64*-*-hpux*" "hppa*-*-linux*" "hppa*-*-lites*"
-clear_xfail "hppa*-*-*n*bsd*" "hppa*-*-rtems*" "*-*-*elf*"
-objcopy_test "pr25662" pr25662.s executable "" "-T$srcdir/$subdir/pr25662.ld"
+clear_xfail "hppa*-*-*n*bsd*" "hppa*-*-rtems*" "hppa*-*-*elf*"
+if { [istarget pdp11-*-*] } {
+    set src "pr25662-pdp11.s"
+} else {
+    set src "pr25662.s"
+}
+
+#xcoff doesn't support arbitrary sections
+if { ![is_xcoff_format] } {
+    objcopy_test "pr25662" $src executable "" "-T$srcdir/$subdir/pr25662.ld"
+}
This page took 0.036426 seconds and 4 git commands to generate.