]> git.sur5r.net Git - cc65/blobdiff - src/ld65/objdata.c
Added the NES target
[cc65] / src / ld65 / objdata.c
index ce88775dc74b30a4b8ae33066e1da22882a9d964..5183c7d817c2f51660e1f914d4a842727e589893 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
+/* (C) 1998-2001 Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -41,6 +41,7 @@
 
 /* ld65 */
 #include "error.h"
+#include "fileinfo.h"
 #include "objdata.h"
 
 
@@ -83,6 +84,8 @@ ObjData* NewObjData (void)
     O->Imports         = 0;
     O->DbgSymCount     = 0;
     O->DbgSyms         = 0;
+    O->LineInfoCount    = 0;
+    O->LineInfos        = 0;
 
     /* Link it into the list */
     if (ObjLast) {
@@ -109,6 +112,7 @@ void FreeObjData (ObjData* O)
     xfree (O->Imports);
     xfree (O->Exports);
     xfree (O->DbgSyms);
+    xfree (O->LineInfos);
     xfree (O);
 }
 
@@ -141,9 +145,9 @@ const char* GetSourceFileName (const ObjData* O, unsigned Index)
        PRECONDITION (Index < O->FileCount);
 
        /* Return the name */
-       return O->Files[Index];
+       return O->Files[Index]->Name;
 
-    }           
+    }
 }