[Nasm-bugs] [Bug 3392401] macho64: ld: illegal text-relocation to ...for architecture x86_64

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Fri Apr 21 14:23:55 PDT 2017


https://bugzilla.nasm.us/show_bug.cgi?id=3392401

--- Comment #3 from H. Peter Anvin <hpa at zytor.com> ---
This might be helpful: the direct and clean translation of
HookAfterStubHeaderBegin from the clang code into NASM syntax would be:

HookAfterStubHeaderBegin:
                  push byte 0
PatchVectorNum    equ $-1                         ; Points to the push
immediate
                  jmp strict qword HookAfterStubHeaderEnd
PatchFuncAddress  equ $-4                         ; Points to JMP address field

                  global HookAfterStubHeaderEnd
HookAfterStubHeaderEnd:


The "strict qword" prevents NASM from generating a byte-sized JMP offset.  The
"qword" is actually not necessary, just "jmp strict HookAfterStubHeaderEnd"
works fine.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list