Making a system call in GAS and using variables in .data section and accessing them for a system call inside another sub-routine
问题 Here is the code example that I have written using GAS syntax for 64 bit intel assembly. When the code is run the expectation is to print out the string: Inside the _print subroutine. #This example is a an example to call a subroutine .global _start .section .text _start: call _print _exit: #exit call mov $60, %rax xor %rdi, %rdi syscall _print: #set up the stack frame push %rbp mov %rsp, %rbp # write syscall's parameter set up mov std_out_fd, %rdi mov $message, %rsi movq message_size, %rdx