#include "alignment.h"
#include "coll.h"
#include "mmodel.h"
+#include "segdefs.h"
#include "segnames.h"
#include "xmalloc.h"
S->Last = 0;
S->FragCount = 0;
S->Num = CollCount (&SegmentList);
+ S->Flags = SEG_FLAG_NONE;
S->Align = 1;
S->RelocMode = 1;
S->PC = 0;
}
/* Calculate the number of fill bytes */
- Count = AlignCount (ActiveSeg->PC, Alignment) - ActiveSeg->PC;
+ Count = AlignCount (ActiveSeg->PC, Alignment);
}
} else {
/* Finalize the expression */
- F->V.Expr = FinalizeExpr (F->V.Expr, &F->LI);
+ F->V.Expr = FinalizeExpr (F->V.Expr, &F->LI);
/* Simplify the expression */
/* ### F->V.Expr = SimplifyExpr (F->V.Expr, &ED); */
/* Write the segment data */
ObjWriteVar (GetStringId (Seg->Def->Name)); /* Name of the segment */
+ ObjWriteVar (Seg->Flags); /* Segment flags */
ObjWriteVar (Seg->PC); /* Size */
ObjWriteVar (Seg->Align); /* Segment alignment */
ObjWrite8 (Seg->Def->AddrSize); /* Address size of the segment */