mirror of
https://github.com/cc65/cc65.git
synced 2025-02-14 03:31:59 +00:00
Read the segment size as var, not as 32 bit value.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5234 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
1e20489ee1
commit
6a01a3407a
@ -204,7 +204,7 @@ Section* ReadSection (FILE* F, ObjData* O)
|
|||||||
/* Read the segment data */
|
/* Read the segment data */
|
||||||
(void) Read32 (F); /* File size of data */
|
(void) Read32 (F); /* File size of data */
|
||||||
Name = MakeGlobalStringId (O, ReadVar (F)); /* Segment name */
|
Name = MakeGlobalStringId (O, ReadVar (F)); /* Segment name */
|
||||||
Size = Read32 (F); /* Size of data */
|
Size = ReadVar (F); /* Size of data */
|
||||||
Align = Read8 (F); /* Alignment */
|
Align = Read8 (F); /* Alignment */
|
||||||
Type = Read8 (F); /* Segment type */
|
Type = Read8 (F); /* Segment type */
|
||||||
FragCount = ReadVar (F); /* Number of fragments */
|
FragCount = ReadVar (F); /* Number of fragments */
|
||||||
@ -258,7 +258,7 @@ Section* ReadSection (FILE* F, ObjData* O)
|
|||||||
|
|
||||||
case FRAG_FILL:
|
case FRAG_FILL:
|
||||||
/* Will allocate memory, but we don't care... */
|
/* Will allocate memory, but we don't care... */
|
||||||
Frag = NewFragment (Type, ReadVar (F), Sec);
|
Frag = NewFragment (Type, ReadVar (F), Sec);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -356,7 +356,7 @@ void SegDump (void)
|
|||||||
printf (" Literal (%u bytes):", F->Size);
|
printf (" Literal (%u bytes):", F->Size);
|
||||||
Count = F->Size;
|
Count = F->Size;
|
||||||
Data = F->LitBuf;
|
Data = F->LitBuf;
|
||||||
J = 100;
|
J = 100;
|
||||||
while (Count--) {
|
while (Count--) {
|
||||||
if (J > 75) {
|
if (J > 75) {
|
||||||
printf ("\n ");
|
printf ("\n ");
|
||||||
@ -503,7 +503,7 @@ void SegWrite (const char* TgtName, FILE* Tgt, Segment* S, SegWriteFunc F, void*
|
|||||||
GetFragmentSourceLine (Frag));
|
GetFragmentSourceLine (Frag));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SEG_EXPR_INVALID:
|
case SEG_EXPR_INVALID:
|
||||||
Error ("Invalid expression in module `%s', line %u",
|
Error ("Invalid expression in module `%s', line %u",
|
||||||
GetFragmentSourceName (Frag),
|
GetFragmentSourceName (Frag),
|
||||||
GetFragmentSourceLine (Frag));
|
GetFragmentSourceLine (Frag));
|
||||||
@ -552,7 +552,7 @@ static int CmpSegStart (const void* K1, const void* K2)
|
|||||||
|
|
||||||
/* Compare the start addresses */
|
/* Compare the start addresses */
|
||||||
if (S1->PC > S2->PC) {
|
if (S1->PC > S2->PC) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (S1->PC < S2->PC) {
|
} else if (S1->PC < S2->PC) {
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user