代码:

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. 详细故障排除步骤:针对 Azure 中到 Windows VM 的远程桌面连接问题

    本文提供详细的故障排除步骤,用于为基于 Windows 的 Azure 虚拟机诊断和修复复杂的远程桌面错误. Important 若要消除更常见的远程桌面错误,请务必先阅读远程桌面的基本故障排除文章, ...

  2. ssh key生成步骤

    1. 安装git,从程序目录打开 "Git Bash" ,或者直接用git shell,github自带的工具 2. 键入命令:ssh-keygen -t rsa -C " ...

  3. Scratch3.0——作品截图

    原文地址:https://blog.csdn.net/weiwoyonzhe/article/details/86603217 Scratch 的舞台是基于canvas,最初尝试直接通过canvas的 ...

  4. iTextSharp 使用详解(转)

    PDF文件是目前比较流行的电子文档格式,在办公自动化(OA)等软件的开发中,经常要用到该格式,但介绍如何制作PDF格式文件的资料非常少,在网上搜来搜去,都转贴的是同一段“暴力”破解的方法,代码片断如下 ...

  5. [翻译] JNWSpringAnimation

    JNWSpringAnimation https://github.com/jwilling/JNWSpringAnimation JNWSpringAnimation is a subclass o ...

  6. ZT pthread_detach

    pthread_detach 创 建一个线程默认的状态是joinable, 如果一个线程结束运行但没有被join,则它的状态类似于进程中的Zombie Process,即还有一部分资源没有被回收(退出 ...

  7. Linux CPU的中断【转载】

    中断其实就是由硬件或软件所发送的一种称为IRQ(中断请求)的信号. 中断允许让设备,如键盘,串口卡,并口等设备表明它们需要CPU. 一旦CPU接收了中断请求,CPU就会暂时停止执行正在运行的程序,并且 ...

  8. D3——Updates, Transitions, and Motion

    <script type="text/javascript"> ; ; ; , , , , , , , , , ,, , , , , , , , , ]; //crea ...

  9. IntelliJ IDEA 与Eclipse Link with Editor等价功能设置

    Link With Editor是Eclipse内置功能中十分小巧,但却异常实用的一个功能. 这个开关按钮 (Toggle Button) 出现在各式导航器视图 ( 例如 Resource Explo ...

  10. 图论——最短路径 Dijkstra算法、Floyd算法

    1.弗洛伊德算法(Floyd) 弗洛伊算法核心就是三重循环,M [ j ] [ k ] 表示从 j 到 k 的路径,而 i 表示当前 j 到 k 可以借助的点:红色部分表示,如果 j 到 i ,i 到 ...