出现的警告内容:
Warning[25] : Label 'xxxxx' is defined pubweak in a section implicitly declared root
把SECTION .text:CODE:REORDER(1)
改成SECTION .text:CODE:REORDER:NOROOT(1)
或
SECTION .text:CODE:REORDER:ROOT(1)
NOROOT和 ROOT 的区别,NOROOT表示如果符号没有被关联的时候是被优化掉的,如果想不被优化则使用ROOT.
官网解决方法:SECTION .text:CODE:REORDER:NOROOT(1),文件链接
https://www.iar.com/support/tech-notes/assembler/warning25-label-xxxxx-is-defined-pubweak-in-a-section-implicitly-declared-root/