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
随机推荐
- 《C++ Primer Plus》读书笔记之四—分支语句和逻辑操作符
第六章 分支语句和逻辑操作符 1.&&的优先级低于关系操作符. 2.取值范围:取值范围的每一部分都使用AND操作符将两个完整的关系表达式组合起来: if(age>17&& ...
- 沉淀再出发:ElasticSearch的中文分词器ik
沉淀再出发:ElasticSearch的中文分词器ik 一.前言 为什么要在elasticsearch中要使用ik这样的中文分词呢,那是因为es提供的分词是英文分词,对于中文的分词就做的非常不好了 ...
- Asp.Net MVC Identity 2.2.1 使用技巧(四)
使用用户管理器之用户管理 一.建立模型 1.在Models文件夹上点右键 >添加>类 类的名称自定,我用AdminViewModels命名的. 2.更改模板自建的AdminView ...
- [BZOJ 1592] Making The Grade路面修整
1592: [Usaco2008 Feb]Making the Grade 路面修整 Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 704 Solv ...
- Spring配置文件中的parent与abstract
在看项目的Spring配置文件时,发现消息队列的配置采用了继承方式配置Bean,在这梳理总结一下. 其实在基于spring框架开发的项目中,如果有多个bean都是一个类的实例,如配置多个数据源时,大部 ...
- php截取后台登陆密码的代码
php截取后台登陆密码的代码,很多时候黑客留了这样的代码,大家一定要注意下if($_POST[loginsubmit]!=){ //判断是否点了登陆按钮 $sb=user:.$_POST[userna ...
- Alpha Scrum7
Alpha Scrum7 牛肉面不要牛肉不要面 Alpha项目冲刺(团队作业5) 各个成员在 Alpha 阶段认领的任务 林志松:项目发布 陈远军.陈彬:播放器各环境的测试 项目的发布说明 本版本的新 ...
- shell基础之脚本执行,命令别名以及快捷键等
脚本执行方式 比如我们在/root/下编写了一个脚本,名字为hello.sh.那么怎么调用执行它呢?有两种办法: (1)直接通过bash,如下: bash hello.sh 注:采用bash执行脚本 ...
- calayer 的特殊属性整理
calayer: An object that manages image-based content and allows you to perform animations on that con ...
- [TJOI2013]攻击装置
题目 癌我竟然会做 发现我们要求的是一个最大独立集问题 发现一个格子和能攻击到的格子的奇偶性和它都不同,于是我们就可以按照\(i+j\)的奇偶性把整张图分成两个部分 两个部分之间没有连边 于是二分图最 ...