This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:TI C/C++编译器
我的代码工作正常、但需要额外的~ 700字节。 我不是 gcc 专家。 如何不链接运行时库?
代码:
#include int main (void){ WDTCTL = WDTPW | WDTHOLD; P1DIR = BIT0; P1OUT = BIT0; while (1);//从不退出 } |
编译命令行:msp430-elf-gcc -O2 -g mycode.c -o mycode.o
objdump 结果:
反汇编.text 段: 0000c00c <__crt0_start>: c00c:31 40 00 04 mov #1024、R1;#0x0400 0000c010 <__crt0_init_bss>: C010:3c 40 02 02 mov #514、R12;#0x0202 (笑声) (笑声) (笑声) (笑声) |
*已解析-使用选项"-minrT"进行编译。
www.theunterminatedstring.com/.../
people.redhat.com/.../size-optimizations.html