]> git.sur5r.net Git - cc65/blobdiff - src/ld65/mapfile.c
Added support for arbitrary alignments.
[cc65] / src / ld65 / mapfile.c
index c9aad3f56d63a489d6aba14e5d764a035e744fb5..6dc4ffb60cb1663c015a9df7237d8248d899e1f8 100644 (file)
@@ -93,8 +93,11 @@ void CreateMapFile (int ShortMap)
              * requested
              */
             if (VerboseMap || S->Size > 0) {
-                fprintf (F, "    %-17s Offs = %06lX   Size = %06lX\n",
-                         GetString (S->Seg->Name), S->Offs, S->Size);
+                fprintf (F, 
+                         "    %-17s Offs=%06lX  Size=%06lX  "
+                         "Align=%05lX  Fill=%04lX\n",
+                         GetString (S->Seg->Name), S->Offs, S->Size,
+                         S->Alignment, S->Fill);
             }
         }
     }
@@ -132,29 +135,17 @@ void CreateMapFile (int ShortMap)
 void CreateLabelFile (void)
 /* Create a label file */
 {
-    unsigned I;
-
     /* Open the label file */
     FILE* F = fopen (LabelFileName, "w");
     if (F == 0) {
        Error ("Cannot create label file `%s': %s", LabelFileName, strerror (errno));
     }
 
-    /* Clear the debug sym table (used to detect duplicates) */
-    ClearDbgSymTable ();
-
     /* Print the labels for the export symbols */
     PrintExportLabels (F);
 
-    /* Create labels from all modules we have linked into the output file */
-    for (I = 0; I < CollCount (&ObjDataList); ++I) {
-
-        /* Get the object file */
-        ObjData* O = CollAtUnchecked (&ObjDataList, I);
-
-        /* Output the labels */
-       PrintDbgSymLabels (O, F);
-    }
+    /* Output the labels */
+    PrintDbgSymLabels (F);
 
     /* Close the file */
     if (fclose (F) != 0) {