Print input and output details (filename, inode number) when error, this makes the debug easier.
Signed-off-by: Robert Yang <liezhi.y...@windriver.com> --- gas/as.c | 4 +++- gas/as.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gas/as.c b/gas/as.c index 02c7d29..6afe9a5 100644 --- a/gas/as.c +++ b/gas/as.c @@ -1259,8 +1259,10 @@ main (int argc, char ** argv) if (sib.st_ino == sob.st_ino && sib.st_ino != 0) { /* Don't let as_fatal remove the output file! */ + saved_out_file_name = xstrdup (out_file_name); out_file_name = NULL; - as_fatal (_("The input and output files must be distinct")); + as_fatal (_("The input (%s, ino: %ld) and output (%s, ino: %ld) files must be distinct"), + argv[i], sib.st_ino, saved_out_file_name, sob.st_ino); } } } diff --git a/gas/as.h b/gas/as.h index 52bb5a7..d97d9b5 100644 --- a/gas/as.h +++ b/gas/as.h @@ -375,6 +375,7 @@ COMMON int flag_noexecstack; /* name of emitted object file */ COMMON const char *out_file_name; +COMMON const char *saved_out_file_name; /* name of file defining extensions to the basic instruction set */ COMMON char *insttbl_file_name; -- 2.7.4 _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils