NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: helmi on February 12, 2018, 01:31:14 PM

Title: format does not support 32-bit absolute addresses
Post by: helmi on February 12, 2018, 01:31:14 PM
I tried to build on my Mac but I get this error:
Mach-O 64-bit format does not support 32-bit absolute addresses

Code: [Select]
mov       rax, [num1]
section   .data
num1:     dq        100

nasm -f macho64 test.asm
Title: Re: format does not support 32-bit absolute addresses
Post by: Frank Kotler on February 12, 2018, 06:38:36 PM
Try "default rel". (I don't know why this works)

Best,
Frank

Title: Re: format does not support 32-bit absolute addresses
Post by: helmi on February 12, 2018, 11:08:24 PM
I think OS X uses rip-relative addressing. I just found this after search on the internet.