Hello Nick,
Thank you for your response.
Maybe the issue is only in Ubuntu 22.04
I was able to make it run in Ubuntu 22.04, by
adding something to the stack (assuming stack alignment issue).
It works fine after that.
Sample:
content of asm_program.asm:
.global main
.text
main:
push %rbx
mov $message, %rdi
call c_function
pop %rbx
ret
.data
#where the message is stored
message: .ascii "Hello World\n\0"
I thought we don't have to get concerned with stack alignment with the new version of gnu.
Let me know if I am wrong.
Thank you again for your response.
Regards,
Arpan