Add section fragments

Fixes #517, and hopefully enables RGBDS as a SDCC back-end
This commit is contained in:
ISSOtm
2020-07-21 19:53:40 +02:00
parent aca00e4fce
commit 1f2f797cb9
17 changed files with 174 additions and 50 deletions

View File

@@ -176,7 +176,10 @@ static void writesection(struct Section const *pSect, FILE *f)
fputlong(pSect->size, f);
fputc(pSect->nType | pSect->isUnion << 7, f);
bool isUnion = pSect->modifier == SECTION_UNION;
bool isFragment = pSect->modifier == SECTION_FRAGMENT;
fputc(pSect->nType | isUnion << 7 | isFragment << 6, f);
fputlong(pSect->nOrg, f);
fputlong(pSect->nBank, f);