PR28673, input file 'gcov' is the same as output file

PR 28673
	* ldlang.c (open_output): Use local_sym_name when checking
	output against input files rather than filename.
This commit is contained in:
Alan Modra 2021-12-08 19:53:54 +10:30
parent a8a7c763fd
commit da1ecf8919

View File

@ -3400,7 +3400,7 @@ open_output (const char *name)
f = f->next_real_file)
if (f->flags.real)
{
char *in = lrealpath (f->filename);
char *in = lrealpath (f->local_sym_name);
if (filename_cmp (in, out) == 0)
einfo (_("%F%P: input file '%s' is the same as output file\n"),
f->filename);