Fix PR binutils/26356 on hppa*-*-hpux*.
[deliverable/binutils-gdb.git] / binutils / testsuite / binutils-all / objcopy.exp
index dd74860f9e9823bdeffeeeab57868fb0508c52ec..9877f3d3107fd7b1f6c34a896f8b1d81744dd621 100644 (file)
@@ -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
@@ -1354,4 +1354,7 @@ if { [istarget pdp11-*-*] } {
     set src "pr25662.s"
 }
 
-objcopy_test "pr25662" $src executable "" "-T$srcdir/$subdir/pr25662.ld"
+#xcoff doesn't support arbitrary sections
+if { ![is_xcoff_format] } {
+    objcopy_test "pr25662" $src executable "" "-T$srcdir/$subdir/pr25662.ld"
+}
This page took 0.023752 seconds and 4 git commands to generate.