Allow getting address of native symbols when using static ffi binding (original) (raw)

We're moving towards a direction where all native symbols will be declaratively specified. We have support for declaratively specifying native C functions (see #43889). #50551 is tracking the same for global variables.

Though we'd also want a way to obtain the address of those declaratively specified external functions (and global variables). Something equivalent to the & address-of operator in C.

Possibly we could have an Pointer<T> addressOf<T>(value) and only allow calling addressOf on values that are external C symbols (functions or global variables).