Reputation: 3
I just don't understand a bit how the disassembled code outputs text without using syscall.
Cpp reference looked like this:
//Your First C++ program
#include <iostream>
using namespace std;
int main(){
std::cout << "Hello World!";
return 0;
}
And disassembled code turn out without any mention of syscall. How is it can be? I use an NASM x86_64
int main(int argc, char **argv, char ***nvp);
0x00001149 endbr64
0x0000114d push rbp
0x0000114e mov rbp, rsp
0x00001151 lea rax, [str. Hello_World]
0x00001158 mov rsi, rax
0x0000115b lea rax, [std::cout]
0x00001162 mov rdi, rax
0x00001165 call section..plt.sec
...
Just curious.
Upvotes: 0
Views: 98