qemu-baremetal-cli-args

QEMU part done https://github.com/cirosantilli/linux-kernel-module-cheat/issues/67
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-04-02 01:00:00 +00:00
parent e25e79c26b
commit 637ef640bf
7 changed files with 161 additions and 70 deletions

View File

@@ -14,15 +14,19 @@ SECTIONS
/* Fix the addresses of everything that comes after, no matter
* the exact size of the code present in .text. This allows us to
* place CLI arguments in memory at a known location! */
/* TODO would be better like this with --section-start=.lkmc_memory= on CLI,
* so that Python controls this value, but I can't that fucking working.
* baremetal_max_size from the Python must match this offset for now.
*/
/*. = SEGMENT_START(.lkmc_memory, .);*/
. = ADDR(.text) + 0x1000000;
lkmc_heap_low = .;
. = . + 0x1000000;
lkmc_heap_top = .;
. = . + 0x1000000;
lkmc_stack_top = .;
. = . + 0x1000000;
lkmc_argv = .;
. = . + 0x4;
lkmc_argc = .;
. = . + 0x4;
lkmc_argv = .;
}