This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[RFA:] (2.12) Tweak binutils-all/objcopy.exp for mmix-knuth-mmixware.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Sun, 17 Feb 2002 16:26:39 -0500 (EST)
- Subject: [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