What is callq instruction?

后端 未结 2 1009
灰色年华
灰色年华 2021-01-01 09:19

I have some gnu assembler code for the x86_64 architecture generated by a tool and there are these instructions:

movq %rsp, %rbp  
leaq str(%rip), %rdi
callq         


        
2条回答
  •  别那么骄傲
    2021-01-01 09:39

    callq refers to a relocatable call in shared libraries/dynamic libraries. The idea is push 0, then push the symbol of to search then call a function so search for it on the first call. In the relocatable table of the program, it replaces the call to the actual location of the function on the first call of the function. Subsequent calls refer to the relocation table that was created at run time.

提交回复
热议问题