DLL generation of the stdlib for unix
This commit is contained in:
parent
03724c2952
commit
c9e011e36c
9 changed files with 101 additions and 111 deletions
2
lib/system/cgprocs.nim
Normal file → Executable file
2
lib/system/cgprocs.nim
Normal file → Executable file
|
|
@ -21,6 +21,6 @@ proc nimGetProcAddr(lib: TLibHandle, name: cstring): TProcAddr {.compilerproc.}
|
|||
|
||||
proc nimLoadLibraryError(path: string) {.compilerproc, noinline.}
|
||||
|
||||
proc setStackBottom(theStackBottom: pointer) {.compilerRtl.}
|
||||
proc setStackBottom(theStackBottom: pointer) {.compilerRtl, noinline.}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -491,10 +491,11 @@ else:
|
|||
const stackIncreases = false
|
||||
|
||||
proc setStackBottom(theStackBottom: pointer) =
|
||||
#c_fprintf(c_stdout, "stack bottom: %p;\n", theStackBottom)
|
||||
# the first init must be the one that defines the stack bottom:
|
||||
if stackBottom == nil: stackBottom = theStackBottom
|
||||
else:
|
||||
var a = cast[TAddress](theStackBottom)
|
||||
var a = cast[TAddress](theStackBottom) # and not PageMask - PageSize*2
|
||||
var b = cast[TAddress](stackBottom)
|
||||
when stackIncreases:
|
||||
stackBottom = cast[pointer](min(a, b))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue