{nemu,npc}: inject mainargs to the bin file
* this removes the dependency of trm.c to keep the mainargs up-to-date
This commit is contained in:
parent
c3ffbc97c3
commit
c52a41181f
5 changed files with 52 additions and 15 deletions
|
@ -5,10 +5,7 @@ extern char _heap_start;
|
|||
int main(const char *args);
|
||||
|
||||
Area heap = RANGE(&_heap_start, PMEM_END);
|
||||
#ifndef MAINARGS
|
||||
#define MAINARGS ""
|
||||
#endif
|
||||
static const char mainargs[] = MAINARGS;
|
||||
static const char mainargs[MAINARGS_MAX_LEN] = MAINARGS_PLACEHOLDER; // defined in CFLAGS
|
||||
|
||||
void putch(char ch) {
|
||||
outb(SERIAL_PORT, ch);
|
||||
|
|
|
@ -9,10 +9,7 @@ extern char _pmem_start;
|
|||
#define PMEM_END ((uintptr_t)&_pmem_start + PMEM_SIZE)
|
||||
|
||||
Area heap = RANGE(&_heap_start, PMEM_END);
|
||||
#ifndef MAINARGS
|
||||
#define MAINARGS ""
|
||||
#endif
|
||||
static const char mainargs[] = MAINARGS;
|
||||
static const char mainargs[MAINARGS_MAX_LEN] = MAINARGS_PLACEHOLDER; // defined in CFLAGS
|
||||
|
||||
void putch(char ch) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue