Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: end of file not at end of a line; newline inserted Assembley

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?

like image 318
Jasurbek Nabijonov Avatar asked Mar 15 '17 17:03

Jasurbek Nabijonov


1 Answers

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.

like image 172
dspencer Avatar answered Nov 06 '22 11:11

dspencer