Improved documentation

This commit is contained in:
Eduard Urbach 2024-08-16 12:49:17 +02:00
parent 1255146794
commit bdd5e5a28e
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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