From 9e1c416f5dd69b80d6240f52e15db65c92218139 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Wed, 24 Jul 2024 23:26:56 +0200 Subject: [PATCH] Fix data segment mapping. --- src/emucore/CartELF.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/emucore/CartELF.cxx b/src/emucore/CartELF.cxx index f39209e8a..c2ec2ecde 100644 --- a/src/emucore/CartELF.cxx +++ b/src/emucore/CartELF.cxx @@ -497,10 +497,12 @@ void CartridgeELF::setupMemoryMap() STACK_SIZE / CortexM0::PAGE_SIZE, false, mySectionStack.get()) .mapRegionCode(ADDR_TEXT_BASE / CortexM0::PAGE_SIZE, TEXT_SIZE / CortexM0::PAGE_SIZE, true, mySectionText.get()) + .mapRegionData(ADDR_DATA_BASE / CortexM0::PAGE_SIZE, + DATA_SIZE / CortexM0::PAGE_SIZE, false, mySectionData.get()) .mapRegionData(ADDR_RODATA_BASE / CortexM0::PAGE_SIZE, - RODATA_SIZE / CortexM0::PAGE_SIZE, true, mySectionData.get()) + RODATA_SIZE / CortexM0::PAGE_SIZE, true, mySectionRodata.get()) .mapRegionData(ADDR_TABLES_BASE / CortexM0::PAGE_SIZE, - TABLES_SIZE / CortexM0::PAGE_SIZE, false, mySectionRodata.get()); + TABLES_SIZE / CortexM0::PAGE_SIZE, true, mySectionTables.get()); }