Author Topic: format does not support 32-bit absolute addresses  (Read 9360 times)

Offline helmi

  • Jr. Member
  • *
  • Posts: 3
format does not support 32-bit absolute addresses
« 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

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: format does not support 32-bit absolute addresses
« Reply #1 on: February 12, 2018, 06:38:36 PM »
Try "default rel". (I don't know why this works)

Best,
Frank


Offline helmi

  • Jr. Member
  • *
  • Posts: 3
Re: format does not support 32-bit absolute addresses
« Reply #2 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.