生成内核映像时,将错误视为无法识别的命令行选项'-mlongcalls'

时间:2015-01-07 12:04:08

标签: linux linux-kernel buildroot

为Xtensa ISS平台生成内核映像 我将编译错误视为无法识别的命令行选项'-mlongcalls' 任何人都能解释一下-mlongcalls吗?为什么它未被识别? 我使用Buildroot生成交叉编译环境。

1 个答案:

答案 0 :(得分:1)

参考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.