mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
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.
This commit is contained in:
@ -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)] {
|
||||
|
Reference in New Issue
Block a user