Added a method to write variable sized unsigned values. Use this method for

all sorts of things in the object files. This does not only make the object
files smaller, but does also remove several limits (strings may be longer
than 255 bytes, several counters no longer have 8 or 16 bit limits).


git-svn-id: svn://svn.cc65.org/cc65/trunk@260 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2000-08-02 13:23:06 +00:00
parent 85d8b3badf
commit 097a01094e
29 changed files with 423 additions and 295 deletions

View File

@@ -6,10 +6,10 @@
/* */
/* */
/* */
/* (C) 1998 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* (C) 1998-2000 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@@ -978,12 +978,12 @@ void WriteImports (void)
/* Write the imports list to the object file */
{
SymEntry* S;
/* Tell the object file module that we're about to start the imports */
ObjStartImports ();
/* Write the import count to the list */
ObjWrite16 (ImportCount);
ObjWriteVar (ImportCount);
/* Walk throught list and write all imports to the file */
S = SymList;
@@ -1015,7 +1015,7 @@ void WriteExports (void)
ObjStartExports ();
/* Write the export count to the list */
ObjWrite16 (ExportCount);
ObjWriteVar (ExportCount);
/* Walk throught list and write all exports to the file */
S = SymList;
@@ -1076,13 +1076,8 @@ void WriteDbgSyms (void)
S = S->List;
}
/* Safety check */
if (Count > 0xFFFF) {
Fatal (FAT_TOO_MANY_SYMBOLS);
}
/* Write the symbol count to the list */
ObjWrite16 (Count);
ObjWriteVar (Count);
/* Walk through list and write all symbols to the file */
S = SymList;
@@ -1118,7 +1113,7 @@ void WriteDbgSyms (void)
} else {
/* No debug symbols */
ObjWrite16 (0);
ObjWriteVar (0);
}