C.bindAddress
Bind a function at its current runtime address.
js
client.bindAddress(address, signature)Arguments
| Argument | Type | Meaning |
|---|---|---|
address | string | Nonzero hexadecimal address in this process, aligned to 4 bytes. |
signature | object | Required returns and args (array of fixed native type names). Optional ownership (borrowed/retained for object results) and captureErrno (boolean). library must be omitted. |
Returns
Callable bound function with release().
Example
js
// Only after obtaining and verifying this address and native signature.
function bindVerifiedAddress(address) {
return C.bindAddress(address, {returns: "int32", args: []});
}Notes
Advanced API: the declared types must match the real native function. Wrong signatures/addresses can crash the target. No variadic functions, callbacks or arbitrary custom structures. Calls run on the target main thread. See C functions and memory for types and ownership. Omit library. ASLR/process restarts invalidate saved addresses; executable memory alone does not prove a valid function entry.