]> git.sur5r.net Git - cc65/blobdiff - src/ld65/exports.h
For modules, the ZP memory area must be written to the output file. This is
[cc65] / src / ld65 / exports.h
index 6247691d0ddffda0216205302daebeff3d5104d3..281b248058038e1756e7b0e4a9b9b36737d93b7e 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2003 Ullrich von Bassewitz                                       */
-/*               Römerstraße 52                                              */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 1998-2010, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -46,8 +46,9 @@
 #include "filepos.h"
 
 /* ld65 */
-#include "objdata.h"
 #include "config.h"
+#include "memarea.h"
+#include "objdata.h"
 
 
 
@@ -80,8 +81,8 @@ struct Export {
     ObjData*           Obj;            /* Object file that exports the name */
     unsigned           ImpCount;       /* How many imports for this symbol? */
     Import*            ImpList;        /* List of imports for this symbol */
-    FilePos            Pos;            /* File position of definition */
     ExprNode*                  Expr;           /* Expression (0 if not def'd) */
+    FilePos            Pos;            /* File position of definition */
     unsigned char      Type;           /* Type of export */
     unsigned char       AddrSize;       /* Address size of export */
     unsigned char      ConDes[CD_TYPE_COUNT];  /* Constructor/destructor decls */
@@ -114,8 +115,11 @@ void FreeImport (Import* I);
 Import* ReadImport (FILE* F, ObjData* Obj);
 /* Read an import from a file and insert it into the table */
 
-void InsertImport (Import* I);
-/* Insert an import into the table */
+Import* GenImport (unsigned Name, unsigned char AddrSize);
+/* Generate a new import with the given name and address size and return it */
+
+Import* InsertImport (Import* I);
+/* Insert an import into the table, return I */
 
 void FreeExport (Export* E);
 /* Free an export. NOTE: This won't remove the export from the exports table,
@@ -132,7 +136,10 @@ void InsertExport (Export* E);
 Export* CreateConstExport (unsigned Name, long Value);
 /* Create an export for a literal date */
 
-Export* CreateMemoryExport (unsigned Name, Memory* Mem, unsigned long Offs);
+Export* CreateExprExport (unsigned Name, ExprNode* Expr, unsigned char AddrSize);
+/* Create an export for an expression */
+
+Export* CreateMemoryExport (unsigned Name, MemoryArea* Mem, unsigned long Offs);
 /* Create an relative export for a memory area offset */
 
 Export* CreateSegmentExport (unsigned Name, Segment* Seg, unsigned long Offs);