[Help] all __gshared vairable address is 0.

kinke noone at nowhere.com
Sun Aug 25 12:57:58 UTC 2019


On Sunday, 25 August 2019 at 12:12:51 UTC, lili wrote:
> I'm writing a OS kernel in D.

Are you aware of https://github.com/PowerNex/PowerNex, a similar 
project?

> and when i call asm_fn in d the return value of asm_fn is 
> return 0x106000 not 0.
>  so why did it occur.

I'd suggest writing the same function in D and comparing the 
produced assembly. Use `-output-s` to generate textual assembly 
files (*.s) directly with LDC.
I guess you need to play around with `-relocation-model`.


More information about the digitalmars-d-ldc mailing list