More refactoring around extern variables

This commit is contained in:
Rangi42
2025-07-21 19:22:10 -04:00
parent d1493a9f96
commit 5f333d9753
8 changed files with 22 additions and 34 deletions

View File

@@ -149,12 +149,9 @@ static ssize_t getPlacement(Section const &section, MemoryLocation &location) {
location.address &= ~section.alignMask;
// Go to next align boundary and add offset
location.address += section.alignMask + 1 + section.alignOfs;
} else {
} else if (++spaceIdx < bankMem.size()) {
// Any location is fine, so, next free block
++spaceIdx;
if (spaceIdx < bankMem.size()) {
location.address = bankMem[spaceIdx].address;
}
location.address = bankMem[spaceIdx].address;
}
// If that location is past the current block's end,