]> git.sur5r.net Git - cc65/blobdiff - src/ld65/config.h
Improved code generation
[cc65] / src / ld65 / config.h
index e2c91e3bada9b5843e298b6763152cc08229f137..38282689f042d96304c5e69ec521c66c8d3ee0cc 100644 (file)
@@ -38,6 +38,7 @@
 
 
 
+/* ld65 */
 #include "segments.h"
 
 
 /* File list entry */
 typedef struct File File;
 struct File {
+    unsigned            Name;           /* Name index of the file */
     File*              Next;           /* Pointer to next entry in list */
     unsigned           Flags;
     unsigned           Format;         /* Output format */
     struct Memory*     MemList;        /* List of memory areas in this file */
     struct Memory*     MemLast;        /* Last memory area in this file */
-    char               Name [1];       /* Name of file */
 };
 
 /* Segment list node. Needed because there are two lists (RUN & LOAD) */
@@ -69,6 +70,7 @@ struct MemListNode {
 /* Memory list entry */
 typedef struct Memory Memory;
 struct Memory {
+    unsigned            Name;           /* Name index of the memory section */
     Memory*            Next;           /* Pointer to next entry in list */
     Memory*                    FNext;          /* Next in file list */
     unsigned                   Attr;           /* Which values are valid? */
@@ -77,24 +79,24 @@ struct Memory {
     unsigned long              Size;           /* Length of memory section */
     unsigned long              FillLevel;      /* Actual fill level of segment */
     unsigned char      FillVal;        /* Value used to fill rest of seg */
+    unsigned char       Relocatable;    /* Memory are is relocatable */
     MemListNode*       SegList;        /* List of segments for this section */
     MemListNode*       SegLast;        /* Last segment in this section */
     File*              F;              /* File that contains the entry */
-    char               Name [1];       /* Name of the memory section */
 };
 
 /* Segment descriptor entry */
 typedef struct SegDesc SegDesc;
 struct SegDesc {
+    unsigned            Name;           /* Index of the name */
     SegDesc*                   Next;           /* Pointer to next entry in list */
-    Segment*           Seg;            /* Pointer to segment structure */
-    unsigned           Attr;           /* Attributes for segment */
-    unsigned           Flags;          /* Set of bitmapped flags */
+    Segment*                   Seg;            /* Pointer to segment structure */
+    unsigned                   Attr;           /* Attributes for segment */
+    unsigned                   Flags;          /* Set of bitmapped flags */
     Memory*            Load;           /* Load memory section */
-    Memory*            Run;            /* Run memory section */
+    Memory*                    Run;            /* Run memory section */
     unsigned long              Addr;           /* Start address or offset into segment */
     unsigned char      Align;          /* Alignment if given */
-    char               Name [1];       /* Copy of name */
 };
 
 /* Segment list */
@@ -110,12 +112,11 @@ extern unsigned           SegDescCount;   /* Number of entries in list */
 #define SF_RO                  0x0001          /* Read only segment */
 #define SF_BSS                 0x0002          /* Segment is BSS style segment */
 #define SF_ZP                  0x0004          /* Zeropage segment (o65 only) */
-#define SF_WPROT       0x0008          /* Write protected segment */
-#define SF_DEFINE              0x0010          /* Define start and size */
-#define SF_ALIGN       0x0020          /* Align the segment */
-#define SF_OFFSET      0x0040          /* Segment has offset in memory */
-#define SF_START       0x0080          /* Segment has fixed start address */
-#define SF_OPTIONAL     0x0100          /* Segment is optional (must not exist) */
+#define SF_DEFINE              0x0008          /* Define start and size */
+#define SF_ALIGN       0x0010          /* Align the segment */
+#define SF_OFFSET      0x0020          /* Segment has offset in memory */
+#define SF_START       0x0040          /* Segment has fixed start address */
+#define SF_OPTIONAL     0x0080          /* Segment is optional (must not exist) */
 #define SF_LOAD_AND_RUN        0x1000          /* LOAD and RUN given */
 #define SF_RUN_DEF             0x2000          /* RUN symbols already defined */
 #define SF_LOAD_DEF    0x4000          /* LOAD symbols already defined */