]> git.sur5r.net Git - cc65/commitdiff
Better error messages
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 12 May 2004 08:51:58 +0000 (08:51 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 12 May 2004 08:51:58 +0000 (08:51 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3025 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ld65/exports.c

index d1eb20df3ee2c70d2a603058ed16dbfaaa73b31c..87caa5e56c28c4ca11a4f69eca31929da3d6cf7d 100644 (file)
@@ -554,21 +554,33 @@ static void CheckSymType (const Export* E)
     while (Imp) {
                if (E->AddrSize != Imp->AddrSize) {
            /* Export is ZP, import is abs or the other way round */
+            const char* ExpAddrSize = AddrSizeToStr (E->AddrSize);
+            const char* ImpAddrSize = AddrSizeToStr (Imp->AddrSize);
+            const char* ExpObjName  = GetObjFileName (E->Obj);
+            const char* ImpObjName  = GetObjFileName (Imp->Obj);
            if (E->Obj) {
                /* User defined export */
-                       Warning ("Address size mismatch for `%s', export in "
-                        "%s(%lu), import in %s(%lu)",
+                       Warning ("Address size mismatch for `%s': Exported from %s, "
+                        "%s(%lu) as `%s', import in %s, %s(%lu) as `%s'",
                         GetString (E->Name),
+                         ExpObjName,
                          GetSourceFileName (E->Obj, E->Pos.Name),
                         E->Pos.Line,
+                         ExpAddrSize,
+                         ImpObjName,
                          GetSourceFileName (Imp->Obj, Imp->Pos.Name),
-                        Imp->Pos.Line);
+                        Imp->Pos.Line,
+                         ImpAddrSize);
            } else {
                /* Export created by the linker */
-               Warning ("Address size mismatch for `%s', imported from %s(%lu)",
+               Warning ("Address size mismatch for `%s': Symbol is `%s'"
+                         ", but imported from %s, %s(%lu) as `%s'",
                         GetString (E->Name),
+                         ExpAddrSize,             
+                         ImpObjName,
                          GetSourceFileName (Imp->Obj, Imp->Pos.Name),
-                        Imp->Pos.Line);
+                        Imp->Pos.Line,
+                         ImpAddrSize);
            }
        }
        Imp = Imp->Next;