I was trying to implement Hello world program in Assembly, but there is some warning:
To implement I used
as -gstabs helloasm.s -o helloasm.o
The Warning:
helloasm.s: Assembler messages:
helloasm.s: Warning: end of file not at end of a line; newline inserted
There is code below:
.global _start
.data
message:.ascii "Hello World\n"
.text
_start:
movq $1, %rax
movq $1, %rdi
movq $message, %rsi
movq $13, %rdx
syscall
movq $60, %rax
xorq %rdi, %rdi
syscall
So, how can I resolve this warning?
As noted in the comments at the time of the question, this warning can be resolved by making sure that the Assembly source file ends in a newline.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With