Error armlink L6238 Startup.o(Start) contains invalid call from '~PRES8' function to 'REQ8' functio
2013-01-25 09:01
453 查看
实验手册上的代码,2.2的集成开发环境,结果就出错了,解决方法是在每个.s文件中添加一个“PRESERVE8”。参见这里。
关于PRESERVE8:
链接器检查要求堆栈八字节对齐的任何代码是否仅由保持堆栈八字节对齐的代码直接或间接地调用。
其中:
是一个可选布尔常数,取值为
如果您的代码保持堆栈八字节对齐,在需要时,可使用
编译属性。 如果您的代码不保持堆栈八字节对齐,则可使用
如果您省略
您可以通过以下方式启用警告:
有关详细信息,请参阅命令语法。
您将会收到类似以下警告:
关于PRESERVE8:
7.8.15. REQUIRE8 和 PRESERVE8
REQUIRE8指令指定当前文件要求堆栈八字节对齐。 它设置 REQ8 生成属性以通知链接器。
PRESERVE8指令指定当前文件保持堆栈八字节对齐。 它设置 PRES8 编译属性以通知链接器。
链接器检查要求堆栈八字节对齐的任何代码是否仅由保持堆栈八字节对齐的代码直接或间接地调用。
语法
REQUIRE8 {bool}
PRESERVE8 {bool}
其中:
bool
是一个可选布尔常数,取值为
{TRUE}或
{FALSE}。
用法
如果您的代码保持堆栈八字节对齐,在需要时,可使用 PRESERVE8设置文件的 PRES8
编译属性。 如果您的代码不保持堆栈八字节对齐,则可使用
PRESERVE8 {FALSE}确保不设置 PRES8 编译属性。
Note
如果您省略 PRESERVE8和
PRESERVE8 {FALSE},汇编器会检查修改 sp 的指令,以决定是否设置 PRES8 编译属性。 ARM 建议明确指定
PRESERVE8。
您可以通过以下方式启用警告:
armasm --diag_warning 1546
有关详细信息,请参阅命令语法。
您将会收到类似以下警告:
"test.s", line 37: Warning: A1546W: Stack pointer update potentially breaks 8 byte stack alignment 37 00000044 STMFD sp!,{r2,r3,lr}
示例
REQUIRE8 REQUIRE8 {TRUE} ; equivalent to REQUIRE8 REQUIRE8 {FALSE} ; equivalent to absence of REQUIRE8 PRESERVE8 {TRUE} ; equivalent to PRESERVE8 PRESERVE8 {FALSE} ; NOT exactly equivalent to absence of PRESERVE8
相关文章推荐
- ADS 转Keil, ADS升级至MDK常见错误 invalid call from '~PRES8' function to 'REQ8' 解决方法
- ADS转RVDS invalid call from '~PRES8' function to 'REQ8' function
- contains invalid call from '~PRES8 (The user did n......
- test.axf: Error: L6238E: cpu_asm.o(test) contains invalid call from '~PRES8
- error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CchatDlg::* )(CPoint)' to 'UI
- RVDS2.2的invalid call from '~PRE8' 解决方法
- invalid conversion from 'const char*' to 'char*'
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CChatDlg::* )(WPARAM,LPARAM)' to
- C++:invalid conversion from 'unsigned char *' to 'const char *'
- cannot convert from 'overloaded-function' to 'AFX_THREADPROC'
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)
- 【关于DrawLine' : ambiguous call to overloaded function解决办法】
- rapidxml 在mac下的编译error: call to function 'print_pi_node' that is neither visible in the template def
- C++ o matching function for call to 'transform...错误
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESU
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESUL
- 'sqtr'ambiguous call to overloaded function
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CTrunkPage::* )(void)' to 'void (__thiscall CCmdTarget::* )(N
- 错误代码: 1582 Incorrect parameter count in the call to native function 'str_to_date'