aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/lib
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-01-20 00:09:13 +0000
committerIan Lance Taylor <ian@airs.com>2010-01-20 00:09:13 +0000
commit500ee42ee091d6e8860d237bd5e74e8cdcf61d70 (patch)
tree60cf2ebadc06364c7e00c8ae0010e00b887b9c8e /binutils/testsuite/lib
parent1696f399f791173c5714c877514861b706f2f6ad (diff)
downloadgdb-500ee42ee091d6e8860d237bd5e74e8cdcf61d70.zip
gdb-500ee42ee091d6e8860d237bd5e74e8cdcf61d70.tar.gz
gdb-500ee42ee091d6e8860d237bd5e74e8cdcf61d70.tar.bz2
binutils/:
* objcopy.c (copy_main): Rewrite OPTION_ADD_SECTION code to work with non-ordinary files like /dev/null. binutils/testsuite/: * lib/utils-lib.exp (run_dump_test): Permit option values to use $srcdir to refer to the source directory. * binutils-all/add-section.d: New test. * binutils-all/add-empty-section.d: New test. * binutils-all/empty-file: New test input file. * binutils-all/objcopy.exp: Run new tests.
Diffstat (limited to 'binutils/testsuite/lib')
-rw-r--r--binutils/testsuite/lib/utils-lib.exp10
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index 393aae8..66a97a4 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -327,6 +327,11 @@ proc run_dump_test { name {extra_options {}} } {
unresolved $subdir/$name
return
}
+
+ # Permit the option to use $srcdir to refer to the source
+ # directory.
+ regsub -all "\\\$srcdir" "$opt_val" "$srcdir/$subdir" opt_val
+
if [string length $opts($opt_name)] {
perror "option $opt_name multiply set in $file.d"
unresolved $subdir/$name
@@ -343,6 +348,11 @@ proc run_dump_test { name {extra_options {}} } {
unresolved $subdir/$name
return
}
+
+ # Permit the option to use $srcdir to refer to the source
+ # directory.
+ regsub -all "\\\$srcdir" "$opt_val" "$srcdir/$subdir" opt_val
+
# add extra option to end of existing option, adding space
# if necessary.
if [string length $opts($opt_name)] {