tools/binman: Teach it about kernels with the data the top of memory
authorAlan Cox <alan@linux.intel.com>
Sun, 12 Aug 2018 23:39:26 +0000 (00:39 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 12 Aug 2018 23:39:26 +0000 (00:39 +0100)
Kernel/tools/binman.c

index 22bc2ea..ab54fd5 100644 (file)
@@ -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