From: Greg King Date: Mon, 22 Apr 2013 19:55:52 +0000 (-0400) Subject: Stopped interrupt dispatcher from being linked even when there are no interruptors. X-Git-Tag: V2.14~61^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d57ae65aad5c4dfff9e8e3890401cb447a319774;p=cc65 Stopped interrupt dispatcher from being linked even when there are no interruptors. Put ld65's CONDES import names into object module's list instead of linker's list. --- diff --git a/src/ld65/exports.c b/src/ld65/exports.c index 90c7bc7b3..8009056e6 100644 --- a/src/ld65/exports.c +++ b/src/ld65/exports.c @@ -399,20 +399,25 @@ Export* ReadExport (FILE* F, ObjData* O) */ for (I = 0; I < CD_TYPE_COUNT; ++I) { const ConDesImport* CDI; - if (E->ConDes[I] != CD_PRIO_NONE && (CDI = ConDesGetImport (I)) != 0) { + if (E->ConDes[I] != CD_PRIO_NONE && (CDI = ConDesGetImport (I)) != 0) { unsigned J; - /* Generate a new import and insert it */ - Import* Imp = InsertImport (GenImport (CDI->Name, CDI->AddrSize)); + /* Generate a new import, and add it to the module's import list. */ + Import* Imp = GenImport (CDI->Name, CDI->AddrSize); + + Imp->Obj = O; + CollAppend (&O->Imports, Imp); - /* Add line info for the config file and for the export that is - * actually the condes that forces the import. + /* Add line info for the export that is actually the condes that + * forces the import. Then, add line info for the config. file. + * The export's info is added first because the import pretends + * that it came from the object module instead of the config. file. */ - CollAppend (&Imp->RefLines, GenLineInfo (&CDI->Pos)); for (J = 0; J < CollCount (&E->DefLines); ++J) { CollAppend (&Imp->RefLines, DupLineInfo (CollAt (&E->DefLines, J))); } + CollAppend (&Imp->RefLines, GenLineInfo (&CDI->Pos)); } }