public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62a570e
)
binman: generate valid binaries for high memory
author
Alan Cox
<alan@linux.intel.com>
Sat, 2 Jun 2018 21:58:44 +0000
(22:58 +0100)
committer
Alan Cox
<alan@linux.intel.com>
Sat, 2 Jun 2018 21:58:44 +0000
(22:58 +0100)
Library/tools/binman.c
patch
|
blob
|
history
diff --git
a/Library/tools/binman.c
b/Library/tools/binman.c
index
14694d3
..
e1cf81a
100644
(file)
--- a/
Library/tools/binman.c
+++ b/
Library/tools/binman.c
@@
-95,8
+95,15
@@
int main(int argc, char *argv[])
}
memcpy(buf + s__INITIALIZED, buf + s__INITIALIZER, l__INITIALIZER);
+ if (progload & 0xFF) {
+ fprintf(stderr, "%s: load address must be page aligned.\n", argv[0]);
+ exit(1);
+ }
- bp = buf + progload + 10;
+ bp = buf + progload + 7;
+ *bp++ = progload >> 8;
+ *bp++ = 0;
+ *bp++ = 0;
*bp++ = s__INITIALIZED - progload;
*bp++ = (s__INITIALIZED - progload) >> 8;
*bp++ = s__DATA - s__INITIALIZED;