mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
Handle symbolic link when copying source file
* lib/utils-lib.exp (run_dump_test): Handle symbolic link when copying source file.
This commit is contained in:
parent
b8836e409e
commit
4ee959fb24
@ -1,3 +1,8 @@
|
||||
2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* lib/utils-lib.exp (run_dump_test): Handle symbolic link when
|
||||
copying source file.
|
||||
|
||||
2015-09-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/19020
|
||||
|
@ -448,6 +448,13 @@ proc run_dump_test { name {extra_options {}} } {
|
||||
}
|
||||
|
||||
if { $opts(as) == "binary" } {
|
||||
while {[file type $srcfile] eq "link"} {
|
||||
set newfile [file readlink $srcfile]
|
||||
if {[string index $newfile 0] ne "/"} {
|
||||
set newfile [file dirname $srcfile]/$newfile
|
||||
}
|
||||
set srcfile $newfile
|
||||
}
|
||||
file copy -force ${srcfile} $tempfile
|
||||
} else {
|
||||
set exec_output [binutils_assemble_flags ${srcfile} $tempfile $opts(as)]
|
||||
|
Loading…
Reference in New Issue
Block a user