代码:

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. leetcode Ch7-Graph Search

    1. Clone Graph BFS: class Solution { public: typedef UndirectedGraphNode UGNode; UndirectedGraphNode ...

  2. kettle 创建任务定时执行数据抽取

    定时执行脚本 使用SPOON 工具建立好转换文件 .ktr,创建下面的.BAT文件,用操作系统的任务调用批处理. G:\soft\data-integration\pan.bat /norep -fi ...

  3. [翻译] TWRPickerSlider

    TWRPickerSlider https://github.com/chasseurmic/TWRPickerSlider Usage Add the dependency to your Podf ...

  4. Windows事件--重复事件检测

    监视器--Windows事件--重复事件检测--计时器重置: 自动重置计时器:指定等待时间10分钟,则在10分钟后自动关闭该警报,更改状态为 正常(绿色) 检测事件1,事件3重置计数器状态,2分钟内检 ...

  5. golang 获取变量类型的字符串格式 列举变量类型

    fmt.Println(reflect.TypeOf(var)) switch xxx.(type){ case int:.... case float32:... case float64:... ...

  6. 海量数据处理面试题(1) 找出两文件种包含的相同的url

    问题:给定a.b两个文件,各存放50亿个url,每个url各占64字节,内存限制是4G,让你找出a.b文件共同的url? 分析:50亿个url,每个url64字节,就是320G,显然是无法一次读入内存 ...

  7. Java学习---Java代码编写规范

    编码规范 1 前言为确保系统源程序可读性,从而增强系统可维护性,java编程人员应具有基本类似的编程风格,兹制定下述Java编程规范,以规范系统Java部分编程.系统继承的其它资源中的源程序也应按此规 ...

  8. SuperSocket 介绍

    一.总体介绍 SuperSocket 是一个轻量级的可扩展的 Socket 开发框架,由江振宇先生开发. 官方网站:http://www.supersocket.net/ SuperSocket具有如 ...

  9. Vim 编辑器及其基本操作

    实验楼某些课程有用 Vim 编辑器来写代码,因此有了这篇博客,据说是上古神器,当然主要目的是基本操作. Vim 编辑器 Vim(Vi IMprove) 是 Linux 系统上的最著名的文本/代码编辑器 ...

  10. js url传值中文乱码完美解决(JAVA)

    js url传值中文乱码完美解决(JAVA) 首先在你的jsp页面这样更改: var url="你要传入的Action的位置&ipid="+ipid+"& ...