Save location information of symbol definitions

Now, object files save the file name and line number where each global
symbol is defined.

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2017-07-22 14:17:27 +01:00
parent 3dec5698db
commit 4dc376b0ee
7 changed files with 52 additions and 4 deletions

View File

@@ -41,6 +41,8 @@ extern void fstk_RunRept(ULONG count);
FILE *
fstk_FindFile(char *);
int fstk_GetLine(void);
extern int yywrap(void);
#endif

View File

@@ -15,7 +15,9 @@ struct sSymbol {
struct Section *pSection;
ULONG ulMacroSize;
char *pMacro;
SLONG(*Callback) (struct sSymbol *);
SLONG(*Callback) (struct sSymbol *);
char tzFileName[_MAX_PATH + 1]; /* File where the symbol was defined. */
ULONG nFileLine; /* Line where the symbol was defined. */
};
#define SYMF_RELOC 0x001 /* symbol will be reloc'ed during
* linking, it's absolute value is