How to get the address of a label in Mac x64?
The following works fine in Win64 and Linux64:
! mov rax, mylabel ;<-- fine in Win/Linux, not Mac?
! mov qword [v_address], rax
MessageRequester("Label address", Hex(address))
But it won't compile in Mac64:
purebasic.asm:115: error: macho: sorry, cannot apply 32 bit absolute relocations in 64 bit mode, consider "[_symbol wrt rip]" for mem access, "qword" And "dq _foo" for pointers.
I tried with EnableAsm and PB inline (as opposed to !-forced inline) but same problem
(I tried - amongst a thousand other things - l_mylabel but no go, as well as [mylabel] encapsulated in square brackets but obviously that just ended up displaying 01020304 - the data at the address, not the address itself)