This is the mail archive of the 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]

[RFA:] (2.12) Tweak binutils-all/objcopy.exp for mmix-knuth-mmixware.

Symbol "Main" (mandatory entry symbol in mmo) must be present
if there are symbols at all, so it's automatically added to
reflect the bfd start address, which causes "run stripped
executable with saving a symbol" to fail.  It seems the best
route is to automatically prune it before checking for correct
output.  Note that there's usually a main too (a symbol "saved"
in the test); those symbols are not exclusive.  No tweak is
needed for strip_test_with_saving_a_symbol: that test strips an
(unlinked) ELF object file.

Ok to commit, trunk and branch?

	* binutils-all/objcopy.exp
	(strip_executable_with_saving_a_symbol): Prune symbol Main in nm
	output for mmix-knuth-mmixware.

Index: objcopy.exp
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/objcopy.exp,v
retrieving revision 1.12
diff -p -c -r1.12 objcopy.exp
*** objcopy.exp	2002/01/14 17:26:13	1.12
--- objcopy.exp	2002/02/17 20:25:55
*************** proc strip_executable_with_saving_a_symb
*** 596,601 ****
--- 596,610 ----

      set exec_output [binutils_run $NM "$NMFLAGS ${copyfile}"]
+     if { [istarget mmix-knuth-mmixware] } {
+ 	# Whenever there's a symbol in the mmo format, there's the symbol
+ 	# Main, so remove it manually from the expected output for sake of
+ 	# this test.
+ 	# Using "" not {} to get the \n and \r translated.
+ 	regsub "^\[0-9a-fA-F\]+\[ \]+T Main\[\n\r\]+" $exec_output "" exec_output
+     }
      if {![regexp {^[0-9a-fA-F]+ T main} $exec_output] \
           && ![regexp {^[0-9a-fA-F]+ T _main} $exec_output]} {
  	fail $test

brgds, H-P

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