cc65 / cc65

cc65 - a freeware C compiler for 6502 based systems

Home Page:https://cc65.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dbgfile misses linker generated symbols

pm100 opened this issue · comments

The --dbgfile output generates a lot of symbol info but it misses the ones generated by the linker (__MAIN_SIZE__, __STACK_SIZE___,....). The imports are listed but not the definitions, and hence not the values.

This info is in the map file and in the VICE label file but its a pain to have to generate and parse two files.

I have code that adds all exports that have E->Obj == NULL (which identifies linker generated symbols) as additional 'sym' records. But

  • they have 'fake' ids, I simply start numbering form the last real sym record
  • they dont have parent or scope since these are derived from the owner , and so break the pattern of the other sym records
  • they dont have def lines, since they dont really exist

These oddities might disturb other code that reads the dbgfile

An alternative would be to add a new dbgfile record , say 'lsym' for 'linker symbol'