From c00f7409ee165b19ecb6ca6c3d366fd376ab06f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ni=C3=B1o=20D=C3=ADaz?= Date: Sat, 22 Jul 2017 15:16:43 +0100 Subject: [PATCH] Improve linker symbol redefinition error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/link/symbol.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/link/symbol.c b/src/link/symbol.c index 2053eab5..10e51c49 100644 --- a/src/link/symbol.c +++ b/src/link/symbol.c @@ -95,7 +95,10 @@ sym_CreateSymbol(char *tzName, SLONG nValue, SLONG nBank, char *tzObjFileName, if (nBank == -1) 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); } }