From e647096c919fb1c304e0585a40c094ff8fb28819 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 13 Aug 2018 00:39:26 +0100 Subject: [PATCH] tools/binman: Teach it about kernels with the data the top of memory --- Kernel/tools/binman.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Kernel/tools/binman.c b/Kernel/tools/binman.c index 22bc2ea1..ab54fd53 100644 --- a/Kernel/tools/binman.c +++ b/Kernel/tools/binman.c @@ -181,6 +181,11 @@ int main(int argc, char *argv[]) will instead be _HEAP */ end = s__HEAP; } + if (end < s__DATA) { + /* Image with data highest */ + end = s__DATA; + pack_discard = 0; + } if (s__CODE2 < 0x10000) { /* Move the initialized data into the right spot rather than sdcc's -- 2.34.1