From: Alan Cox Date: Sun, 12 Aug 2018 23:39:26 +0000 (+0100) Subject: tools/binman: Teach it about kernels with the data the top of memory X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e647096c919fb1c304e0585a40c094ff8fb28819;p=FUZIX.git tools/binman: Teach it about kernels with the data the top of memory --- 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