代码:

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

随机推荐

  1. C/C++内存管理详解 ZZ

    内存管理是C++最令人切齿痛恨的问题,也是C++最有争议的问题,C++高手从中获得了更好的性能,更大的自由,C++菜鸟的收获则是一遍一遍的 检查代码和对C++的痛恨,但内存管理在C++中无处不在,内存 ...

  2. 深入浅出SharePoint2010——请假系统无代码篇之数据框架设计

    文档库SOP:上传用户操作手册等系统相关文档. 员工信息列表EmployeeInfo:用来存储员工基本信息.直属领导和假卡信息. 请假申请列表LeaveRequest:申请人Requester填写请假 ...

  3. Monster: half man, half beast and very scary.

    Monster: half man, half beast and very scary. 怪物,半人半兽很吓人.

  4. 记录智能指针使用shared_ptr使用错误

    shared_ptr为智能指针,今天一次在使用shared_ptr时,错误的将其初始化方式写为shared_ptr<T> test = shared_ptr<T>(),随后导致 ...

  5. php-fpm配置参数.md

    Global Options pid string PID文件的位置.默认为空.默认路径放在/usr/local/php-fpm/var. error_log string 错误日志的位置.默认:安装 ...

  6. 死磕salt系列-salt 故障汇总

    这里将salt使用过程中遇到的所有的故障进行一个汇总. grains 匹配后多了一个列表 salt-master中配置jinja模板来匹配自定义的grins. vim /etc/salt/minion ...

  7. 【[SDOI2008]山贼集团】

    非常好的一道题 树上的状压\(dp\) 根据数据范围我们就能知道这是一道需要状压的题目 所以状态就是\(dp[i][S]\)表示在以\(i\)为根的子树里,选择的状态为\(S\)的最大收益 这个收益只 ...

  8. 【PHP】mysql_insert_id() 函数

    mysql_insert_id() 函数返回上一步 INSERT 操作产生的 ID. 如果上一查询没有产生 AUTO_INCREMENT 的 ID,则 mysql_insert_id() 返回 0. ...

  9. linux下批量重命名文件

    # 使用通配符批量创建 多个文件:$ touch zqunor{1..7}.txt # 批量将多个后缀为 .txt 的文本文件重命名为以 .c 为后缀的文件:$ rename 's/\.txt/\.c ...

  10. PHP过滤

    1.过滤是不是URL(后台过滤) $url = "https://www.baidu.com"; if(!filter_var($url,FILTER_VALIDATE_URL)) ...