This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] ld testsuite failures for s390*.


Hi,
the last one for today. This patches fixes a problem in the linker scripts
ld-elfvsb/elf-offset.ld and ld-shared/elf-offset.ld. gcc-3.3 for s390 uses
-fasynchronous-unwind-tables by default. Without the .rela.eh_frame line
in the linker script the linker creates broken shared libraries for the
non-PIC tests. To make the testsuite happy on s390x some setup_xfails are
added and the setup_xfail in ld-undefined is removed.

This patch is not strictly necessary for 2.14 but it would be nice to
have. So again it is applicable for CVS head and the 2.14 branch.
Ok to commit ?

blue skies,
  Martin.

2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* ld-elfvsb/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frame
	to linker script.
	* ld-elfvsb/elfvsb.exp (visibility_run): Add setup_xfails for s390x.
	* ld-selective/selective.exp: Disable for s390 and s390x.
	* ld-shared/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frame
	to linker script.
	* ld-shared/shared.exp (shared_test): Add setup_xfails for s390x.
	* ld-undefined/undefined.exp (checkund): Remove setup_xfail for s390x.

diff -urN binutils-2.14.90.0.1/ld/testsuite/ld-elfvsb/elf-offset.ld binutils-2.14.90.0.1-s390/ld/testsuite/ld-elfvsb/elf-offset.ld
--- binutils-2.14.90.0.1/ld/testsuite/ld-elfvsb/elf-offset.ld	2003-05-09 10:07:53.000000000 +0200
+++ binutils-2.14.90.0.1-s390/ld/testsuite/ld-elfvsb/elf-offset.ld	2003-05-09 09:58:11.000000000 +0200
@@ -58,6 +58,8 @@
   .rela.bss      : { *(.rela.bss)		}
   .rel.plt       : { *(.rel.plt)		}
   .rela.plt      : { *(.rela.plt)		}
+  .rel.eh_frame  : { *(.rel.eh_frame)		}
+  .rela.eh_frame : { *(.rela.eh_frame)		}
   .init          : { KEEP (*(.init))	}
   .plt      : { *(.plt)	}
   .text      :
diff -urN binutils-2.14.90.0.1/ld/testsuite/ld-elfvsb/elfvsb.exp binutils-2.14.90.0.1-s390/ld/testsuite/ld-elfvsb/elfvsb.exp
--- binutils-2.14.90.0.1/ld/testsuite/ld-elfvsb/elfvsb.exp	2003-05-09 10:07:53.000000000 +0200
+++ binutils-2.14.90.0.1-s390/ld/testsuite/ld-elfvsb/elfvsb.exp	2003-05-09 09:58:11.000000000 +0200
@@ -259,6 +259,12 @@
 		setup_xfail "ia64-*-linux*"
 		setup_xfail "alpha*-*-linux*"
 	    }
+	    if { ![ string match $visibility "hidden" ]
+		 && ![ string match $visibility "hidden_undef" ]
+		 && ![ string match $visibility "hidden_undef_def" ]
+		 && ![ string match $visibility "protected_undef" ] } {
+		setup_xfail "s390x-*-linux*"
+	    }
 	    setup_xfail "x86_64-*-linux*"
 
 	    visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb
@@ -347,6 +353,12 @@
 		    setup_xfail "ia64-*-linux*"
 		    setup_xfail "alpha*-*-linux*"
 		}
+		if { ![ string match $visibility "hidden" ]
+		     && ![ string match $visibility "hidden_undef" ]
+		     && ![ string match $visibility "hidden_undef_def" ]
+		     && ![ string match $visibility "protected_undef" ] } {
+		    setup_xfail "s390x-*-linux*"
+		}
 		setup_xfail "x86_64-*-linux*"
 		visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb
 	    }
diff -urN binutils-2.14.90.0.1/ld/testsuite/ld-selective/selective.exp binutils-2.14.90.0.1-s390/ld/testsuite/ld-selective/selective.exp
--- binutils-2.14.90.0.1/ld/testsuite/ld-selective/selective.exp	2003-05-09 10:07:53.000000000 +0200
+++ binutils-2.14.90.0.1-s390/ld/testsuite/ld-selective/selective.exp	2003-05-09 09:58:11.000000000 +0200
@@ -39,6 +39,11 @@
     return
 }
 
+# s390 does not support selective linking
+if {[istarget "s390*-*-*"]} {
+    return
+}
+
 # List contains test-items with three items followed by four lists:
 # 1:name 2:test-type (CC or C++; add as needed) 3:filename 4:ld-flags
 # 5:must-have-symbols 6:must-not-have-symbols 7:xfail-targets.
diff -urN binutils-2.14.90.0.1/ld/testsuite/ld-shared/elf-offset.ld binutils-2.14.90.0.1-s390/ld/testsuite/ld-shared/elf-offset.ld
--- binutils-2.14.90.0.1/ld/testsuite/ld-shared/elf-offset.ld	2003-05-09 10:07:53.000000000 +0200
+++ binutils-2.14.90.0.1-s390/ld/testsuite/ld-shared/elf-offset.ld	2003-05-09 09:58:11.000000000 +0200
@@ -58,6 +58,8 @@
   .rela.bss      : { *(.rela.bss)		}
   .rel.plt       : { *(.rel.plt)		}
   .rela.plt      : { *(.rela.plt)		}
+  .rel.eh_frame  : { *(.rel.eh_frame)		}
+  .rela.eh_frame : { *(.rela.eh_frame)		}
   .init          : { KEEP (*(.init))	}
   .plt      : { *(.plt)	}
   .text      :
diff -urN binutils-2.14.90.0.1/ld/testsuite/ld-shared/shared.exp binutils-2.14.90.0.1-s390/ld/testsuite/ld-shared/shared.exp
--- binutils-2.14.90.0.1/ld/testsuite/ld-shared/shared.exp	2003-05-09 10:07:53.000000000 +0200
+++ binutils-2.14.90.0.1-s390/ld/testsuite/ld-shared/shared.exp	2003-05-09 09:58:11.000000000 +0200
@@ -201,6 +201,7 @@
 	setup_xfail "ia64-*-linux*"
 	setup_xfail "alpha*-*-linux*"
 	setup_xfail "x86_64-*-linux*"
+	setup_xfail "s390x-*-linux*"
 	shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
 
 	# Test ELF shared library relocations with a non-zero load
@@ -256,6 +257,7 @@
 	    setup_xfail "ia64-*-linux*"
 	    setup_xfail "alpha*-*-linux*"
 	    setup_xfail "x86_64-*-linux*"
+	    setup_xfail "s390x-*-linux*"
 	    shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
 	}
     } else {
diff -urN binutils-2.14.90.0.1/ld/testsuite/ld-undefined/undefined.exp binutils-2.14.90.0.1-s390/ld/testsuite/ld-undefined/undefined.exp
--- binutils-2.14.90.0.1/ld/testsuite/ld-undefined/undefined.exp	2003-05-09 10:08:30.000000000 +0200
+++ binutils-2.14.90.0.1-s390/ld/testsuite/ld-undefined/undefined.exp	2003-05-09 10:08:24.000000000 +0200
@@ -142,8 +142,6 @@
 # the function. Therefore the line number in the error message is 8 instead
 # of 9. On 64 bit s/390 this works because of the new brasl instruction that
 # doesn't need a literal pool entry.
-# With gcc 3.1 s/390 uses dwarf-2 and the test will fail on 64 bit as well.
 setup_xfail s390-*-*
-setup_xfail s390x-*-*
 
 checkund $ml $testline


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]