gpt4 book ai didi

gcc - 警告 : end of file not at end of a line; newline inserted Assembley

转载 作者:行者123 更新时间:2023-12-04 11:53:27 28 4
gpt4 key购买 nike

我试图在 Assembly 中实现 Hello world 程序,但有一些警告:
为了实现我用

as -gstabs helloasm.s -o helloasm.o

警告:

helloasm.s: Assembler messages:
helloasm.s: Warning: end of file not at end of a line; newline inserted



下面有代码:
.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

那么,我该如何解决这个警告呢?

最佳答案

正如问题时的评论中所指出的,可以通过确保程序集源文件以换行符结尾来解决此警告。

关于gcc - 警告 : end of file not at end of a line; newline inserted Assembley,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42816756/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com