Can not get struct member addresses at compile time
Doeme
doeme at the-internet.org
Wed Jun 16 22:27:13 UTC 2021
On Wednesday, 16 June 2021 at 22:16:54 UTC, H. S. Teoh wrote:
> The compiler does not (and cannot) know. But the runtime
> dynamic linker can, and does. The two are bridged by the
> compiler emitting a relocatable symbol for the address of the
> global variable, with a table of relocations (offsets in the
> code) that the runtime linker patches the actual addresses into
> when the program is executed.
>
>
> T
Exactly! Except that the dynamic linker is not really involved
here, since all the symbols can/must be relocated statically at
link time.
More information about the Digitalmars-d-learn
mailing list