From 1b9cd16ffbb1fdb1f55e4e2fb9cc61f14673a551 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 25 Jun 2018 22:10:37 +0100 Subject: [PATCH] binman: discard may be above commonmem and that's just fine --- Kernel/tools/binman.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kernel/tools/binman.c b/Kernel/tools/binman.c index b94dd153..22bc2ea1 100644 --- a/Kernel/tools/binman.c +++ b/Kernel/tools/binman.c @@ -121,8 +121,10 @@ int main(int argc, char *argv[]) } /* linker will allow us to overlap _DISCARD (which may grow) - with _COMMONMEM. */ - if(s__DISCARD && s__DISCARD+l__DISCARD > s__COMMONMEM){ + with _COMMONMEM. Don't however worry if DISCARD is above common + as can happen in some odder layouts */ + if(s__DISCARD && s__DISCARD+l__DISCARD > s__COMMONMEM && + s__DISCARD < s__COMMONMEM + l__COMMONMEM) { fprintf(stderr, "Move _DISCARD down by at least %d bytes\n", s__DISCARD + l__DISCARD - s__COMMONMEM); exit(1); -- 2.34.1