64-bit Mach-O format does not support 32-bit absolute addresses

I have a sample code that writes the value of the xmm6 register to a memory location. The code is in NASM:

value:
    dd 0

movq [value], xmm6

However, I get an error when I try to compile it in macho64 format:

The 64-bit format does not support 32-bit absolute addresses.

Is there any way to resolve this? I am new to x86_64 build, so any help would be appreciated.

+3
source share
2 answers

You must tell the assembler that you are not pointing to an 8-byte memory location:

movq qword[value], xmm6
+2
source

It seems I decided on my own question:

value:
    dd 0

default rel
movq [value], xmm6

It's really?

+2
source

Source: https://habr.com/ru/post/1752953/


All Articles