/* */
/* */
/* */
-/* (C) 1998-2005 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 */
#include "exports.h"
#include "global.h"
#include "error.h"
+#include "library.h"
#include "mapfile.h"
#include "objdata.h"
#include "segments.h"
const ObjData* O = CollConstAt (&ObjDataList, I);
/* Output the data */
- if (O->LibName != INVALID_STRING_ID) {
+ if (O->Lib) {
/* The file is from a library */
- fprintf (F, "%s(%s):\n", GetString (O->LibName), GetObjFileName (O));
+ fprintf (F, "%s(%s):\n", GetLibFileName (O->Lib), GetObjFileName (O));
} else {
fprintf (F, "%s:\n", GetObjFileName (O));
}
- for (J = 0; J < O->SectionCount; ++J) {
- const Section* S = O->Sections [J];
+ for (J = 0; J < CollCount (&O->Sections); ++J) {
+ const Section* S = CollConstAt (&O->Sections, J);
/* Don't include zero sized sections if not explicitly
* 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);
}
}
}
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) {