diff --git a/Booting/linux-bootstrap-2md.md b/Booting/linux-bootstrap-2md.md index fcedf19..53824b0 100644 --- a/Booting/linux-bootstrap-2md.md +++ b/Booting/linux-bootstrap-2md.md @@ -337,13 +337,14 @@ ENDPROC(memset) ```C char *stack_end; - + + //%P1 is (-STACK_SIZE) if (boot_params.hdr.loadflags & CAN_USE_HEAP) { asm("leal %P1(%%esp),%0" : "=r" (stack_end) : "i" (-STACK_SIZE)); ``` -`stack_end = esp - STACK_SIZE`. +换言之`stack_end = esp - STACK_SIZE`. Then there is the `heap_end` calculation: ```c