[Nasm-devel] Referring to an extern named 'wait'
Scott Graham
sgraham at h4ck3r.net
Thu Mar 9 19:39:19 PST 2023
Hi,
I'm getting an unexpected error in assembling the following code (command
line is `nasm -f elf64 tmp.s`, version 2.16.01):
extern wait:function
extern memcpy:function
section .text
func:
push rbp
mov rbp, rsp
; ...
mov rax, [rel memcpy wrt ..got]
mov rax, [rel wait wrt ..got]
; ...
mov rsp, rbp
pop rbp
ret
The mov referencing "memcpy" works as expected, but the one trying to to
calculate the address of "wait" (as in posix wait(2)) reports the following
error:
tmp.s:9: error: invalid size specification in effective address
tmp.s:9: error: expression syntax error
I guess it might be related to https://www.felixcloutier.com/x86/wait:fwait
?
Is there a syntax available to escape "wait"? Or should nasm be expected to
disambiguate that from context?
Thanks for any suggestions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nasm.us/archives/nasm-devel/attachments/20230310/04de04f7/attachment.htm>
More information about the Nasm-devel
mailing list