Improved documentation

This commit is contained in:
Eduard Urbach 2024-08-16 12:49:17 +02:00
parent 141ec1158d
commit 499fe8aec8
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
3 changed files with 10 additions and 1 deletions

View File

@ -18,7 +18,7 @@ go build
## Usage
Build a Linux x86-64 ELF executable from `examples/hello` and run it:
Build an executable from `examples/hello` and run it:
```shell
./q run examples/hello

View File

@ -1,7 +1,14 @@
write(_ Int, _ Pointer, _ Int) -> Int {
// WriteFile(fd, buffer, length, out numberOfBytesWritten, out overlapped)
return 0
}
mmap(_ Int, _ Int, _ Int, _ Int) -> Pointer {
// VirtualAlloc(address, length, flags, protection)
return 0
}
exit(_ Int) {
// ExitProcess(code)
return
}

View File

@ -13,6 +13,8 @@ importing a few core functions from "kernel32.dll".
The section where the DLL function pointers are stored does not need to be marked as writable.
The Windows executable loader resolves the pointers before they are loaded into memory.
The stack must be 16 byte aligned before a DLL function is called.
## Links
- https://learn.microsoft.com/en-us/windows/win32/debug/pe-format