1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-08 06:25:17 +00:00

Merge pull request #1 from greg-king5/master

Fixes a bug that links the interruptor dispatcher even when there are no interruptors.
This commit is contained in:
Oliver Schmidt
2013-04-23 06:08:55 -07:00

View File

@@ -399,20 +399,25 @@ Export* ReadExport (FILE* F, ObjData* O)
*/ */
for (I = 0; I < CD_TYPE_COUNT; ++I) { for (I = 0; I < CD_TYPE_COUNT; ++I) {
const ConDesImport* CDI; 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; unsigned J;
/* Generate a new import and insert it */ /* Generate a new import, and add it to the module's import list. */
Import* Imp = InsertImport (GenImport (CDI->Name, CDI->AddrSize)); Import* Imp = GenImport (CDI->Name, CDI->AddrSize);
/* Add line info for the config file and for the export that is Imp->Obj = O;
* actually the condes that forces the import. CollAppend (&O->Imports, Imp);
/* 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) { for (J = 0; J < CollCount (&E->DefLines); ++J) {
CollAppend (&Imp->RefLines, DupLineInfo (CollAt (&E->DefLines, J))); CollAppend (&Imp->RefLines, DupLineInfo (CollAt (&E->DefLines, J)));
} }
CollAppend (&Imp->RefLines, GenLineInfo (&CDI->Pos));
} }
} }