mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Improve map file output
Print the name of each section along with the size, base and end addresses. If a section is empty, don't print the end address, as it can overflow if the base address is 0. Signed-off-by: AntonioND <antonio_nd@outlook.com>
This commit is contained in:
@@ -96,9 +96,14 @@ MapfileWriteSection(struct sSection * pSect)
|
|||||||
SLONG i;
|
SLONG i;
|
||||||
|
|
||||||
if (mf) {
|
if (mf) {
|
||||||
fprintf(mf, " SECTION: $%04lX-$%04lX ($%04lX bytes)\n",
|
if (pSect->nByteSize > 0) {
|
||||||
pSect->nOrg, pSect->nOrg + pSect->nByteSize - 1,
|
fprintf(mf, " SECTION: $%04lX-$%04lX ($%04lX bytes) [\"%s\"]\n",
|
||||||
pSect->nByteSize);
|
pSect->nOrg, pSect->nOrg + pSect->nByteSize - 1,
|
||||||
|
pSect->nByteSize, pSect->pzName);
|
||||||
|
} else {
|
||||||
|
fprintf(mf, " SECTION: $%04lX ($0 bytes) [\"%s\"]\n",
|
||||||
|
pSect->nOrg, pSect->pzName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < pSect->nNumberOfSymbols; i += 1) {
|
for (i = 0; i < pSect->nNumberOfSymbols; i += 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user