Extend the object code format by adding a (currently empty) scope table.

Use the address size for import, export and debug symbols (object code
change).
More changes to support the --memory-model switch and address sizes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2691 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-11-28 22:12:14 +00:00
parent e3eea961c2
commit 8f9a21ae3f
35 changed files with 589 additions and 254 deletions

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 1998-2003 Ullrich von Bassewitz */
/* R<>merstrasse 52 */
/* R<>merstra<EFBFBD>e 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -40,6 +40,7 @@
/* common */
#include "coll.h"
#include "inline.h"
#include "objdefs.h"
@@ -61,7 +62,7 @@ struct ObjData {
unsigned LibName; /* Name of library */
unsigned long MTime; /* Time of last modification */
ObjHeader Header; /* Header of file */
unsigned long Start; /* Start offset of data in library */
unsigned long Start; /* Start offset of data in library */
unsigned Flags;
unsigned FileCount; /* Input file count */
struct FileInfo** Files; /* List of input files */
@@ -79,6 +80,8 @@ struct ObjData {
unsigned* Strings; /* List of global string indices */
unsigned AssertionCount; /* Count of module assertions */
struct Assertion** Assertions; /* List of module assertions */
unsigned ScopeCount; /* Count of scopes */
struct Scope** Scopes; /* List of scopes */
};
@@ -124,6 +127,16 @@ const char* GetObjFileName (const ObjData* O);
* file is NULL.
*/
#if defined(HAVE_INLINE)
INLINE int ObjHasFiles (const ObjData* O)
/* Return true if the files list does exist */
{
return (O != 0 && O->Files != 0);
}
#else
# defined ObjHasFiles(O) ((O) != 0 && (O)->Files != 0)
#endif
const char* GetSourceFileName (const ObjData* O, unsigned Index);
/* Get the name of the source file with the given index. If O is NULL, return
* "[linker generated]" as the file name.