diff --git a/src/ld65/dbgsyms.c b/src/ld65/dbgsyms.c index db2f8c663..551979aac 100644 --- a/src/ld65/dbgsyms.c +++ b/src/ld65/dbgsyms.c @@ -484,7 +484,7 @@ void PrintHLLDbgSyms (FILE* F) /* For non auto symbols output the debug symbol id of the asm sym */ if (HLL_HAS_SYM (S->Flags)) { - fprintf (F, ",sym=%u", S->Sym->Id); + fprintf (F, ",sym=%u", O->SymBaseId + S->Sym->Id); } /* Terminate the output line */