diff --git a/src/ld65/exports.c b/src/ld65/exports.c index b83d8b496..be14f7484 100644 --- a/src/ld65/exports.c +++ b/src/ld65/exports.c @@ -694,10 +694,15 @@ static void CheckSymType (const Export* E) GetString (E->Obj->Name), GetSourceName (ExportLI), GetSourceLine (ExportLI)); - } else { + } else if (ExportLI) { SB_Printf (&ExportLoc, "%s(%u)", GetSourceName (ExportLI), GetSourceLine (ExportLI)); + } else { + /* The export is linker generated and we don't have line + ** information (likely from command line define) + */ + SB_Printf (&ExportLoc, "linker"); } if (I->Obj) { /* The import comes from an object file */