mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 12:34:26 +01:00
baremetal: fix heap and stack position in preparation for CLI arguments
This commit is contained in:
16
baremetal/linker_variables.c
Normal file
16
baremetal/linker_variables.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#baremetal-linker-script */
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern int32_t lkmc_argc;
|
||||
extern int32_t lkmc_heap_low;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
printf("&lkmc_heap_low %p\n", (void*)&lkmc_heap_low);
|
||||
printf("&lkmc_argc %p\n", (void*)&lkmc_argc);
|
||||
printf("lkmc_argc %" PRId32 "\n", lkmc_argc);
|
||||
}
|
||||
Reference in New Issue
Block a user