]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - binutils/testsuite/lib/utils-lib.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / binutils / testsuite / lib / utils-lib.exp
index 1bb5e616e4b5682bf3b6335591c5678a9e7bb905..b644781a90c4f7f0bbb50ff7de0500937a191747 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1993-2020 Free Software Foundation, Inc.
+# Copyright (C) 1993-2021 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -80,13 +80,16 @@ proc default_binutils_run { prog progargs } {
         regsub -- "-j \\.bss"  $progargs "-j [lindex $sect_names 2]" progargs
     }
 
+    # Gotta quote dollar-signs because they get mangled by the
+    # shell otherwise.  Since get_standard_section_names returns
+    # quoted section names, we first remove the original quote
+    # and then requote.
+    regsub -all {\\\$} "$progargs" {$} progargs
+    regsub -all {\$} "$progargs" {\$} progargs
+
     send_log "$prog $progargs\n"
     verbose "$prog $progargs"
 
-    # Gotta quote dollar-signs because they get mangled by the
-    # shell otherwise.
-    regsub -all "\\$" "$progargs" "\\$" progargs
-
     set state [remote_exec host $prog $progargs]
     set binutils_run_status [lindex $state 0]
     set exec_output [prune_warnings [lindex $state 1]]