Bernardo Innocenti wrote:

 > Bernardo Innocenti wrote:
 >
 >> this patch makes it easy to see what the fake linker does.
 >>
 >> We're not forwarding -v to the linker because that's the way
 >> all the other toolchain components work.
 >
 >
 > This is a better version of the patch, covering all executed
 > linker commands and using set -x instead of relying on cut & paste
 > correctness.

Oops, the previous patch had a bogus hunk.  I must have been
smoking crack or perhaps SCO shares ;-)

diff -Nru elf2flt-20031224.orig/ld-elf2flt.in elf2flt-20031224/ld-elf2flt.in
--- elf2flt-20031224.orig/ld-elf2flt.in	2003-07-23 19:07:50.000000000 +0200
+++ elf2flt-20031224/ld-elf2flt.in	2003-12-24 11:53:51.504232539 +0100
@@ -31,6 +31,7 @@
 	FINAL="yes"
 	FINAL_ONLY=
 	MOVDAT=
+	VERBOSE=
 
 	while [ $# -ne 0 ]
 	do
@@ -65,6 +66,7 @@
 		-r|-Ur)   FINAL=""                     # this is not a final link
 		          ARG1="$ARG1 $1"
 				  ;;
+		-v)       VERBOSE="y" ;;
 
 		*)        ARG1="$ARG1 $1"
 				  ;;
@@ -126,26 +128,36 @@
 
 		if [ "@got_check@" = "no" ]
 		then
+		 [ x"$VERBOSE" = x"y" ] && set -x
 		 $LINKER $SDIRS -T $LDSCRIPT -Ur -d -o "$OFILE.elf" $ARG1         ||exit $?
 		 $LINKER $SDIRS -T $LDSCRIPT -o "$OFILE.gdb" $ARG1                ||exit $?
+		 [ x"$VERBOSE" = x"y" ] && set +x
 		else
+		 [ x"$VERBOSE" = x"y" ] && set -x
 		 $LINKER -r -d -o "$OFILE.elf2flt" $ARG1                          ||exit $?
 		 $LINKER $SDIRS -T $LDSCRIPT -Ur -o "$OFILE.elf" "$OFILE.elf2flt" ||exit $?
 		 $LINKER $SDIRS -T $LDSCRIPT -o "$OFILE.gdb" "$OFILE.elf2flt"     ||exit $?
 		 rm -f "$OFILE.elf2flt"
+		 [ x"$VERBOSE" = x"y" ] && set +x
 		fi
 		if grep _GLOBAL_OFFSET_TABLE_ "$OFILE.gdb" > /dev/null 
 		then
+			[ x"$VERBOSE" = x"y" ] && set -x
 			$ELF2FLT $FLTFLAGS -o "$OFILE" -p "$OFILE.gdb" "$OFILE.elf" || exit $?
+			[ x"$VERBOSE" = x"y" ] && set +x
 		else
+			[ x"$VERBOSE" = x"y" ] && set -x
 			$ELF2FLT $FLTFLAGS -o "$OFILE" -r "$OFILE.elf" || exit $?
+			[ x"$VERBOSE" = x"y" ] && set +x
 		fi
 		rm -f "$OFILE.elf"  # not needed for any reason
 		rm -f "$NEWLDSCRIPT"
 		exit 0
 	fi
 
+	[ x"$VERBOSE" = x"y" ] && set -x
 	exec $LINKER -o "$OFILE" $ARG1
+	[ x"$VERBOSE" = x"y" ] && set +x
 fi
 
 #
