X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCglue.c;h=1cb787fc7ed1136b9d8642212e8c2a22a1b8fec2;hb=d010bd18867edba95da10d259068d22d5d7c114f;hp=da74378f09a5e7171c73f0948c6a41c96106a4df;hpb=12a291f30d83a482bfa8c8e464f89eecbe57a4bf;p=fw%2Fsdcc diff --git a/src/SDCCglue.c b/src/SDCCglue.c index da74378f..1cb787fc 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -1464,10 +1464,12 @@ glue () /* create the overlay segments */ - fprintf (asmFile, "%s", iComments2); - fprintf (asmFile, "; overlayable items in internal ram \n"); - fprintf (asmFile, "%s", iComments2); - copyFile (asmFile, ovrFile); + if (overlay) { + fprintf (asmFile, "%s", iComments2); + fprintf (asmFile, "; overlayable items in internal ram \n"); + fprintf (asmFile, "%s", iComments2); + copyFile (asmFile, ovrFile); + } /* create the stack segment MOF */ if (mainf && IFFUNC_HASBODY(mainf->type)) @@ -1480,10 +1482,12 @@ glue () } /* create the idata segment */ - fprintf (asmFile, "%s", iComments2); - fprintf (asmFile, "; indirectly addressable internal ram data\n"); - fprintf (asmFile, "%s", iComments2); - copyFile (asmFile, idata->oFile); + if (idata) { + fprintf (asmFile, "%s", iComments2); + fprintf (asmFile, "; indirectly addressable internal ram data\n"); + fprintf (asmFile, "%s", iComments2); + copyFile (asmFile, idata->oFile); + } /* copy the bit segment */ fprintf (asmFile, "%s", iComments2);