这里的 .size 指令有什么作用吗?
Does the .size directive here do anything?
我目前正在尝试使用 LLVM 3.7.1 在 x86-64 主机上为 powerpc64le 目标交叉编译 musl 1.1.18。它无法在下面显示的 error: unexpected token in '.end' directive
上编译 file/code。 这不是我的问题。
来自src/internal/powerpc64/syscall.s:
.global __syscall
.hidden __syscall
.type __syscall,@function
__syscall:
mr 0, 3 # Save the system call number
mr 3, 4 # Shift the arguments: arg1
mr 4, 5 # arg2
mr 5, 6 # arg3
mr 6, 7 # arg4
mr 7, 8 # arg5
mr 8, 9 # arg6
sc
bnslr+ # return if not summary overflow
neg 3, 3 # otherwise error: return negated value.
blr
.end __syscall
.size __syscall, .-__syscall
我的问题是:这里的 .size
指令是否有 任何功能? According to the gas documentation,.end
指令表示文件结束,不再处理任何内容。我在这里遗漏了什么吗?
这似乎是 GNU 汇编程序的一个未记录的功能。显然它用于发出 ECOFF 格式的调试信息。参见 gas/config/obj-ecoff.c:259
和 gas/ecoff.c:2981
/* ECOFF specific debugging information. */
{ "aent", ecoff_directive_ent, 1 },
{ "begin", ecoff_directive_begin, 0 },
{ "bend", ecoff_directive_bend, 0 },
{ "end", ecoff_directive_end, 0 },
我目前正在尝试使用 LLVM 3.7.1 在 x86-64 主机上为 powerpc64le 目标交叉编译 musl 1.1.18。它无法在下面显示的 error: unexpected token in '.end' directive
上编译 file/code。 这不是我的问题。
来自src/internal/powerpc64/syscall.s:
.global __syscall
.hidden __syscall
.type __syscall,@function
__syscall:
mr 0, 3 # Save the system call number
mr 3, 4 # Shift the arguments: arg1
mr 4, 5 # arg2
mr 5, 6 # arg3
mr 6, 7 # arg4
mr 7, 8 # arg5
mr 8, 9 # arg6
sc
bnslr+ # return if not summary overflow
neg 3, 3 # otherwise error: return negated value.
blr
.end __syscall
.size __syscall, .-__syscall
我的问题是:这里的 .size
指令是否有 任何功能? According to the gas documentation,.end
指令表示文件结束,不再处理任何内容。我在这里遗漏了什么吗?
这似乎是 GNU 汇编程序的一个未记录的功能。显然它用于发出 ECOFF 格式的调试信息。参见 gas/config/obj-ecoff.c:259 和 gas/ecoff.c:2981
/* ECOFF specific debugging information. */
{ "aent", ecoff_directive_ent, 1 },
{ "begin", ecoff_directive_begin, 0 },
{ "bend", ecoff_directive_bend, 0 },
{ "end", ecoff_directive_end, 0 },