代码:

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++primer(4)——类(1):构造函数,类型别名

    1  最简单地说,类即使定义了一个新的类型和一个新的作用域. 2  基础 1  构造函数 构造函数一般应使用一个构造函数初始化列表,来初始化对象的数据成员. Sales_item(): units_s ...

  2. selenium+python smtp邮件

    #code:utf-8 import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIM ...

  3. Buffers与cached啥区别

    A buffer is something that has yet to be “written” to disk. A cache is something that has been “read ...

  4. cheerio数据抓取

    很多语言都能写个爬虫抓取数据,js自然也可以,使用cheerio可以支持css检索,较快捷的获取需要的数据.首先,先把node.js给安装了.可到官网下载.安装好node.js后,使用npm安装che ...

  5. java 方法修改主函数里基本数据类型和引用数据类型的区别

    public class Dog { public void Age(int age) {//副本新建的age age++;//对副本修改 System.out.println(age); } pub ...

  6. 【[HEOI2016/TJOI2016]序列】

    压行真漂亮 首先这肯定是一个\(dp\)了 设\(dp_i\)表示\(i\)结尾的最长不下降子序列的长度 显然我们要找一个\(j\)来转移 也就是\(dp_i=max(dp_j+1)\) 那么什么样的 ...

  7. 1、Web Service-开始入坑(基础简介)

    1.关于Schema 具体介绍:https://baike.baidu.com/item/Schema/15286221?fr=aladdin 几个重要的知识点: 2.HTTP协议 具体介绍看博文:h ...

  8. 自定义ViewPagerIndicator-视图指示器

    ViewPagerIndicator.java public class ViewPagerIndicator extends LinearLayout { private Paint mPaint; ...

  9. Linux常用监控服务器性能命令

    列举比较常用的几种监控服务器性能的Linux命令.其实,在我看来,目前针对Linux系统内存.硬盘.TCP/IP等等相关的指标,Linux本身自带的或者是一些开源项目等基本上都能达到这个获取服务器性能 ...

  10. Reading SBAR SDN flow-Based monitoring and Application Recognition

    概要 在sdn下,控制平面基于网络测量的的数据控制网络,而细粒度的管理得益于细粒度的测量数据.针对sdn环境下的细粒度测量(识别具体应用程序),可以实现对细粒度的流量管控. 设计了识别系统SBAR,对 ...