代码:

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. SparkRDD函数详解

    1.RDD操作详解 启动spark-shell spark-shell --master spark://hdp-node-01:7077 1.1 基本转换 1) map map是对RDD中的每个元素 ...

  2. 打通版微社区(1):PHP环境部署 for DZX3.2

    写在前面:本文参考了http://blog.sina.com.cn/s/blog_513be2630101linz.html非常感谢博主此文对我此次操作帮助很大.PHP的windows部署方案主要分为 ...

  3. POP动画[2]

    POP动画[2] 1:定制控制器间的转场动画. 源码有点多-_-!! // // RootViewController.h // Animation // // Copyright (c) 2014年 ...

  4. 点开无线显示"已连接 安全",但是点击下面无线图标却显示"无法连接internet",解决方案

    管理员权限运行“命令提示符” 输入:netsh winsock reset 然后重启电脑即可

  5. December 19th 2016 Week 52nd Sunday

    Truth and roses have thorns about them. 真理和玫瑰,身边都有刺. Either truth or roses, they all have thorns aro ...

  6. LINQ入门与标准查询运算符

    LINQ的体系结构 查询表达式的完整语法 一.查询表达式必须以from子句开头,以select 或group子句结束.中间可以使用where,orderby ,join,let和其他子句.具有“延迟计 ...

  7. codeforces 17C Balance(动态规划)

    codeforces 17C Balance 题意 给定一个串,字符集{'a', 'b', 'c'},操作是:选定相邻的两个字符,把其中一个变成另一个.可以做0次或者多次,问最后可以生成多少种,使得任 ...

  8. codeforces 12D Ball

    codeforces 12D Ball 这道题有两种做法 一种用树状数组/线段树维护区间最值,一种用map维护折线,昨天我刚遇见了一道类似的用STL维护折线的题目: 392D Three Arrays ...

  9. Java 基本语法(关键字、标识符、常量、注释)

    1. Java 程序的构成 对象(object):对象是类的一个实例,有状态和行为. 类(class):类是一个模板,它描述一类对象的行为和状态. 方法(method):方法就是行为,一个类可以有很多 ...

  10. angular.js中提供的基础方法

    angular.bind angular.callbacks angular.equals /* *Determines if two objects or two values are equiva ...