]> git.sur5r.net Git - cc65/blobdiff - src/ld65/o65.c
Separate processing the linker config file into two phases: The config file is
[cc65] / src / ld65 / o65.c
index e583bb8c3dea176b9410d0153fe0b91731374a24..6845efed112d8acad023b1d3efaa7f289eb284fa 100644 (file)
@@ -53,6 +53,7 @@
 #include "fileio.h"
 #include "global.h"
 #include "lineinfo.h"
+#include "memarea.h"
 #include "o65.h"
 #include "spool.h"
 
@@ -175,7 +176,7 @@ struct ExprDesc {
     O65Desc*               D;                  /* File format descriptor */
     long                   Val;                /* The offset value */
     int                    TooComplex;         /* Expression too complex */
-    Memory*         MemRef;             /* Memory reference if any */
+    MemoryArea*     MemRef;             /* Memory reference if any */
     Segment*        SegRef;             /* Segment reference if any */
     Section*               SecRef;             /* Section reference if any */
     ExtSym*                ExtRef;             /* External reference if any */
@@ -244,7 +245,7 @@ static void CvtMemoryToSegment (ExprDesc* ED)
  */
 {
     /* Get the memory area from the expression */
-    Memory* M = ED->MemRef;
+    MemoryArea* M = ED->MemRef;
 
     /* Remember the "nearest" segment and its offset */
     Segment* Nearest   = 0;
@@ -1227,9 +1228,9 @@ static void O65SetupSegments (O65Desc* D, File* F)
     D->ZPCount   = 0;
 
     /* Walk over the memory list */
-    for (I = 0; I < CollCount (&F->MemList); ++I) {
+    for (I = 0; I < CollCount (&F->MemoryAreas); ++I) {
         /* Get this entry */
-        Memory* M = CollAtUnchecked (&F->MemList, I);
+        MemoryArea* M = CollAtUnchecked (&F->MemoryAreas, I);
 
         /* Walk through the segment list and count the segment types */
         unsigned J;
@@ -1257,9 +1258,9 @@ static void O65SetupSegments (O65Desc* D, File* F)
 
     /* Walk again through the list and setup the segment arrays */
     TextIdx = DataIdx = BssIdx = ZPIdx = 0;
-    for (I = 0; I < CollCount (&F->MemList); ++I) {
+    for (I = 0; I < CollCount (&F->MemoryAreas); ++I) {
         /* Get this entry */
-        Memory* M = CollAtUnchecked (&F->MemList, I);
+        MemoryArea* M = CollAtUnchecked (&F->MemoryAreas, I);
 
         /* Walk over the segment list and check the segment types */
         unsigned J;