This is the mail archive of the binutils@sourceware.org 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]

Re: binutils testsuite error on cygwin:


On Fri, May 11, 2007 at 01:21:27PM +0200, Christian Joensson wrote:
> great, but the test fails now:
> 
> FAIL: objcopy doesn't strip needed symbols

The test isn't valid.  Your target converts the reloc against "foo"
into one against a section symbol, thus allowing "foo" to be
stripped.  

	* binutils-all/objcopy.exp: Only run needed-by-reloc test for ELF.

Index: binutils/testsuite/binutils-all/objcopy.exp
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/objcopy.exp,v
retrieving revision 1.44
diff -u -p -r1.44 objcopy.exp
--- binutils/testsuite/binutils-all/objcopy.exp	2 May 2007 10:38:00 -0000	1.44
+++ binutils/testsuite/binutils-all/objcopy.exp	15 May 2007 04:20:45 -0000
@@ -775,28 +775,29 @@ run_dump_test "copy-2"
 run_dump_test "copy-3"
 
 if [is_elf_format] {
-    run_dump_test "localize-hidden-1"
     run_dump_test "strip-1"
     run_dump_test "strip-2"
     run_dump_test "strip-3"
-}
-run_dump_test "localize-hidden-2"
 
-if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } {
-    # Check to make sure we don't strip a symbol named in relocations.
-    set test "objcopy doesn't strip needed symbols"
+    if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } {
+	# Check to make sure we don't strip a symbol named in relocations.
+	set test "objcopy keeps symbols needed by relocs"
 
-    set srcfile $srcdir/$subdir/needed-by-reloc.s
+	set srcfile $srcdir/$subdir/needed-by-reloc.s
 
-    if {![binutils_assemble $srcfile tmpdir/bintest.o]} then {
-        unresolved $test
-    } else {
-        set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS --strip-symbol=foo tmpdir/bintest.o ${copyfile}.o"]
+	if {![binutils_assemble $srcfile tmpdir/bintest.o]} then {
+	    unresolved $test
+	} else {
+	    set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS --strip-symbol=foo tmpdir/bintest.o ${copyfile}.o"]
 
-        if [regexp "not stripping symbol `foo' because it is named in a relocation" $got] {
-            pass $test
-        } else {
-            fail $test
-        }
+	    if [regexp "not stripping symbol `foo' because it is named in a relocation" $got] {
+		pass $test
+	    } else {
+		fail $test
+	    }
+	}
     }
+
+    run_dump_test "localize-hidden-1"
 }
+run_dump_test "localize-hidden-2"

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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