ARMCC中$Super$$和$Sub$$的使用
代码:
extern int $Super$$main(void);
/* re-define main function */
int $Sub$$main(void)
{
rt_hw_interrupt_disable();
rtthread_startup();
return 0;
}
Use of $Super$$ and $Sub$$ to patch symbol definitions
There are special patterns you can use for situations where an existing symbol cannot be modified.
An existing symbol cannot be modified, for example, if it is located in an external library or in ROM code. In such cases you can use the $Super$$ and $Sub$$ patterns to patch an existing symbol.To patch the definition of the function foo():
$Super$$foo
Identifies the original unpatched function foo(). Use this to call the original function directly.
$Sub$$foo
Identifies the new function that is called instead of the original function foo(). Use this to add processing before or after the original function.
-----Note-----
The $Sub$$ and $Super$$ mechanism only works at static link time, $Super$$ references cannot be imported or exported into the dynamic symbol table.
详见参考手册:ARM® Compiler v5.06 for µVision® Version 5 armlink User Guide
链接:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0377g/pge1362065967698.html
随机推荐
- pt-summary
pt-summary主要是用来统计机器信息: [root@mxqmongodb2 bin]# ./pt-summary # Percona Toolkit System Summary Report ...
- c#(winform)环境下使用动态链接库dll的详解
1,什么是dll文件? DLL(Dynamic Link Library)文件为动态链接库文件,又称“应用程序拓展”,是软件文件类型.在Windows中,许多应用程序并不是一个完整的可执行文件,它们被 ...
- DOM介绍
什么是DOM DOM:文档对象模型.DOM 为文档提供了结构化表示,并定义了如何通过脚本来访问文档结构.目的其实就是为了能让js操作html元素而制定的一个规范. DOM就是由节点组成的. 解析过程 ...
- [翻译] SVProgressHUD
SVProgressHUD https://github.com/TransitApp/SVProgressHUD SVProgressHUD is a clean and easy-to-use H ...
- Selenium2学习(一)-pip降级selenium3.0
selenium版本安装后启动Firefox出现异常:'geckodriver' executable needs to be in PATH selenium默默的升级到了3.0,然而网上的教程都是 ...
- 毫秒级百万数据分页存储过程(mssql)
/****** Object: StoredProcedure [dbo].[up_Page2005] Script Date: 11/28/2013 17:10:47 ******/ SET ANS ...
- Visual Studio Code (vscode)编译C++
Visual Studio Code (简称 VS Code / VSC) 是一款免费开源的现代化轻量级代码编辑器,支持几乎所有主流的开发语言的语法高亮.智能代码补全.自定义热键.括号匹配.代码片段. ...
- MySQL语法相关其一
一篇基础语法相关的笔记 // 参考资料: MySQL入门很简单 黄缙华等编著 清华大学出版社 北京 建议进入官网下载对应版本后安装:https://dev.mysql.com/downloads/my ...
- S/4HANA生产订单增强WORKORDER_UPDATE方法BEFORE_UPDATE参数分析
题目这个增强的输入参数很恐怖,长长的一串: CALL BADI l_badi->BEFORE_UPDATE EXPORTING IT_PIINSTRUCTIONVALUE = IT_PIINST ...
- 英语的各种 n. adj. vt. vi. 等词性解释
n. 名词 v. 动词(既可作及物动词,也可作不及物动词的就用这个表示) pron. 代词 adj. 形容词(后接名词) adv. 副词(修饰动词.形容词或其他副词) abbr. (这是一个缩写符号) ...