Improve linker symbol redefinition error messages

Now, the object file in which each definition is (as well as the source
file and line) are printed with the error message.

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2017-07-22 15:16:43 +01:00
parent 92449a4fe4
commit c00f7409ee

View File

@@ -95,7 +95,10 @@ sym_CreateSymbol(char *tzName, SLONG nValue, SLONG nBank, char *tzObjFileName,
if (nBank == -1) if (nBank == -1)
return; return;
errx(1, "Symbol '%s' defined more than once", tzName); errx(1, "'%s' in both %s : %s(%d) and %s : %s(%d)",
tzName, tzObjFileName, tzFileName, nFileLine,
(*ppSym)->tzObjFileName,
(*ppSym)->tzFileName, (*ppSym)->nFileLine);
} }
} }