UASM icon indicating copy to clipboard operation
UASM copied to clipboard

mach-o reloc length != 2

Open johnothwolo opened this issue 4 years ago • 1 comments

Using the OFFSET keyword causes the following ld error:

ld: in section __TEXT,__text reloc 0: length != 2 and X86_64_RELOC_SIGNED* not supported file 'test.o' for architecture x86_64

Here's an example to reporoduce the code

;  test.asm

_printf PROTO, format:PTR BYTE, args:VARARG

.data
fmt DB "Hello %s"
message DB "World", 0ah

.code
_main PROC
    invoke _printf, OFFSET fmt, OFFSET message
    ret
_main ENDP

END

johnothwolo avatar Apr 09 '22 22:04 johnothwolo

Have you tried using ADDR instead of OFFSET? I don't have a test setup for Mac/Macho at the moment to check myself.

john-terraspace avatar Apr 12 '22 15:04 john-terraspace

Given the move to ARM based Mac's .. and no access to Mac machines to build/test on I'm closing any support for Mac or Macho outputs.

john-terraspace avatar Oct 02 '22 16:10 john-terraspace