Changed the object file and library format. There is now an additional
string table in the object file that (currently) holds all identifiers from the import, export and debug info sections. The plan is to put all strings into this table, so we have them in a central place and don't waste memory. Apart from that, the indices are unique, so comparing strings should be a lot easier than before (as soon as the programs take advantage of this fact, which is currently not the case). git-svn-id: svn://svn.cc65.org/cc65/trunk@2169 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2001 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* (C) 1998-2003 Ullrich von Bassewitz */
|
||||
/* R<EFBFBD>merstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
@@ -259,6 +259,10 @@ Section* ReadSection (FILE* F, ObjData* O)
|
||||
/* Read the fragment type */
|
||||
unsigned char Type = Read8 (F);
|
||||
|
||||
/* Extract the check mask from the type */
|
||||
unsigned char Check = Type & FRAG_CHECKMASK;
|
||||
Type &= ~FRAG_CHECKMASK;
|
||||
|
||||
/* Handle the different fragment types */
|
||||
switch (Type) {
|
||||
|
||||
@@ -305,6 +309,14 @@ Section* ReadSection (FILE* F, ObjData* O)
|
||||
|
||||
}
|
||||
|
||||
/* A check expression may follow */
|
||||
if (Check & FRAG_CHECK_WARN) {
|
||||
Frag->WarnExpr = ReadExpr (F, O);
|
||||
}
|
||||
if (Check & FRAG_CHECK_ERROR) {
|
||||
Frag->ErrorExpr = ReadExpr (F, O);
|
||||
}
|
||||
|
||||
/* Read the file position of the fragment */
|
||||
ReadFilePos (F, &Frag->Pos);
|
||||
|
||||
@@ -506,7 +518,12 @@ void SegWrite (FILE* Tgt, Segment* S, SegWriteFunc F, void* Data)
|
||||
/* Loop over all fragments in this section */
|
||||
Frag = Sec->FragRoot;
|
||||
while (Frag) {
|
||||
|
||||
/* Do fragment alignment checks */
|
||||
|
||||
|
||||
|
||||
/* Output fragment data */
|
||||
switch (Frag->Type) {
|
||||
|
||||
case FRAG_LITERAL:
|
||||
@@ -525,7 +542,7 @@ void SegWrite (FILE* Tgt, Segment* S, SegWriteFunc F, void* Data)
|
||||
case SEG_EXPR_RANGE_ERROR:
|
||||
Error ("Range error in module `%s', line %lu",
|
||||
GetSourceFileName (Frag->Obj, Frag->Pos.Name),
|
||||
Frag->Pos.Line);
|
||||
Frag->Pos.Line);
|
||||
break;
|
||||
|
||||
case SEG_EXPR_TOO_COMPLEX:
|
||||
|
||||
Reference in New Issue
Block a user