gpt4 book ai didi

linux - 生成内核镜像时,出现无法识别的命令行选项 ‘-mlongcalls' 错误

转载 作者:太空狗 更新时间:2023-10-29 12:30:47 25 4
gpt4 key购买 nike

在为 Xtensa ISS 平台生成内核镜像时我收到编译错误,因为无法识别的命令行选项“-mlongcalls”任何人都可以向我解释 -mlongcalls 吗?为什么无法识别?我正在使用 Buildroot 生成交叉编译环境。

最佳答案

引用man gcc

**-mlongcalls**
**-mno-longcalls**

When this option is enabled, GCC instructs the assembler to translate direct calls to indirect calls unless it can determine that the target of a direct call is in the range
allowed by the call instruction. This translation typically occurs for calls to functions in other source files. Specifically, the assembler translates a direct "CALL"
instruction into an "L32R" followed by a "CALLX" instruction. The default is -mno-longcalls. This option should be used in programs where the call target can potentially be
out of range. This option is implemented in the assembler, not the compiler, so the assembly code generated by GCC still shows direct call instructions---look at the
disassembled object code to see the actual instructions. Note that the assembler uses an indirect call for every cross-file call, not just those that really are out of range.

关于linux - 生成内核镜像时,出现无法识别的命令行选项 ‘-mlongcalls' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27819130/

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