Mark the symbol that is the name of a scope with the size of that scope

(previously only the scope itself had that size).
Pass the size of symbols through the object file to the linker. Bump the
object file version and adjust object file reading tools (od65, ar65) to this
change.
Read the size in the linker and output it in the debug info.
Bump the minor version number of the debug info. Read the size and allow to
access it via the API. Do better version checking for the debug info and try
to be smarter when encountering unknown keywords to improve support for newer
minor versions.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5057 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-06-13 18:43:50 +00:00
parent 7c2104c3cb
commit 795d9e1a1c
22 changed files with 349 additions and 170 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2003-2008, Ullrich von Bassewitz */
/* (C) 2003-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -35,7 +35,7 @@
#ifndef SIZEOF_H
#define SIZEOF_H
/* common */
@@ -54,22 +54,27 @@ struct SymTable;
/*****************************************************************************/
/* Data */
/*****************************************************************************/
extern const StrBuf SizeEntryName; /* Contains name of symbol with size */
/*****************************************************************************/
/* Code */
/*****************************************************************************/
int IsSizeOfSymbol (const struct SymEntry* Sym);
/* Return true if the given symbol is the one that encodes the size of some
* entity. Sym may also be a NULL pointer in which case false is returned.
*/
struct SymEntry* FindSizeOfScope (struct SymTable* Scope);
/* Get the size of a scope. The function returns the symbol table entry that
* encodes the size or NULL if there is no such entry.
*/
struct SymEntry* FindSizeOfSymbol (struct SymEntry* Sym);
/* Get the size of a symbol table entry. The function returns the symbol table
* entry that encodes the size of the symbol or NULL if there is no such entry.
*/
struct SymEntry* GetSizeOfScope (struct SymTable* Scope);
/* Get the size of a scope. The function returns the symbol table entry that
* encodes the size, and will create a new entry if it does not exist.