diff --git a/src/ca65/symtab.c b/src/ca65/symtab.c index b88f4f1f5..f835dc60c 100644 --- a/src/ca65/symtab.c +++ b/src/ca65/symtab.c @@ -675,7 +675,7 @@ void SymDump (FILE* F) void WriteImports (void) /* Write the imports list to the object file */ { - SymEntry* S; + SymEntry* S; /* Tell the object file module that we're about to start the imports */ ObjStartImports (); @@ -865,6 +865,11 @@ void WriteDbgSyms (void) ObjWriteVar (Size); } + /* If the symbol is an import, write out its import id */ + if (SYM_IS_IMPORT (SymFlags)) { + ObjWriteVar (GetSymImportId (S)); + } + /* Write the line infos */ WriteLineInfo (&S->LineInfos); }