]> git.sur5r.net Git - cc65/blobdiff - src/ld65/bin.c
Ignore module.inc
[cc65] / src / ld65 / bin.c
index 7f4b08551b3eacedfcd3b865b42ad26b79427e0b..017b5a15cf8139e8cdeef6d6d32c0264aa4a4ccf 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1999-2000 Ullrich von Bassewitz                                       */
+/* (C) 1999-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       */
@@ -45,6 +45,7 @@
 #include "global.h"
 #include "error.h"
 #include "fileio.h"
+#include "lineinfo.h"
 #include "segments.h"
 #include "exports.h"
 #include "config.h"
@@ -99,7 +100,8 @@ void FreeBinDesc (BinDesc* D)
 
 
 static unsigned BinWriteExpr (ExprNode* E, int Signed, unsigned Size,
-                             unsigned long Offs, void* Data)
+                             unsigned long Offs attribute ((unused)),
+                             void* Data)
 /* Called from SegWrite for an expression. Evaluate the expression, check the
  * range and write the expression value to the file.
  */
@@ -186,6 +188,7 @@ static void BinWriteMem (BinDesc* D, Memory* M)
         * if the memory area is the load area.
         */
                if (DoWrite) {
+           RelocLineInfo (S->Seg);
            SegWrite (D->F, S->Seg, BinWriteExpr, D);
        } else if (M->Flags & MF_FILL) {
            WriteMult (D->F, M->FillVal, S->Seg->Size);
@@ -214,7 +217,7 @@ static void BinWriteMem (BinDesc* D, Memory* M)
 
 
 
-static int BinUnresolved (const char* Name, void* D)
+static int BinUnresolved (const char* Name attribute ((unused)), void* D)
 /* Called if an unresolved symbol is encountered */
 {
     /* Unresolved symbols are an error in binary format. Bump the counter