Assembly ARM cortex M3汇编程序中任意地址的程序
有人知道如何将程序放在ARM汇编程序内存中的任意地址吗?默认情况下,程序的位置从地址0x00000008开始,但它必须位于地址0x200000处。我试图使用Assembly ARM cortex M3汇编程序中任意地址的程序,assembly,arm,cortex-m3,Assembly,Arm,Cortex M3,有人知道如何将程序放在ARM汇编程序内存中的任意地址吗?默认情况下,程序的位置从地址0x00000008开始,但它必须位于地址0x200000处。我试图使用DCD 0x200000,但这只会更改寄存器指针,而程序仍保持在旧地址。space0x400命令运行良好,但如果地址太大,则编译需要很长时间。告诉我,也许面对这个 /opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s /
DCD 0x200000
,但这只会更改寄存器指针,而程序仍保持在旧地址。space0x400
命令运行良好,但如果地址太大,则编译需要很长时间。告诉我,也许面对这个
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
您通常可以通过修改正在使用的链接器脚本,或者通过向GNU ld提供某些命令行选项来实现此结果
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
根据您提供的信息,我假设您的代码当前在两个第一个向量条目表之后启动,即初始SP值和重置值,并且您的向量表位于0x00000000
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
示例1.s应该或多或少像您当前的代码:
.cpu cortex-m3
.thumb
.syntax unified
.global Reset_Handler
.equ StackTop, 0x1000
.word StackTop
.word Reset_Handler
Reset_Handler:
b .
.end
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example1.o -c example1.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler -Ttext-segment=0x00000000 -Map=example1.map -o example1.elf example1.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d example1.elf
example1.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <Reset_Handler-0x8>:
0: 00001000 .word 0x00001000
4: 00000008 .word 0x00000008
00000008 <Reset_Handler>:
8: e7fe b.n 8 <Reset_Handler>
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
重置\u处理程序:b
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as-o示例2.o-c示例2.s
/opt/arm/gcc-arm-8.2-2019.01-x86\u 64-arm-eabi/bin/arm-eabi-ld-g-e重置\u处理程序--节开始=.vectors=0x00000000-Ttext段=0x200000-Map=example2.Map-o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld:警告:“文本段”的地址不是最大页面大小的倍数
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump-d-j.vectors-j.text-d example2.elf
示例2.elf:文件格式elf32 littlearm
节向量的分解:
00000000 :
0:000011000.字0x000011000
4:20002000。单词0x20002000
第节的分解。正文:
20002000 :
20002000:e7fe b.n 20002000
.完
向量表仍然位于正确的内存位置,但代码现在位于0x20002000
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
为了描述为获得相同结果而使用的链接器脚本中所需的确切更改,我需要查看其内容。您通常可以通过修改正在使用的链接器脚本或向GNU ld提供某些命令行选项来实现此结果
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
根据您提供的信息,我假设您的代码当前在两个第一个向量条目表之后启动,即初始SP值和重置值,并且您的向量表位于0x00000000
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
示例1.s应该或多或少像您当前的代码:
.cpu cortex-m3
.thumb
.syntax unified
.global Reset_Handler
.equ StackTop, 0x1000
.word StackTop
.word Reset_Handler
Reset_Handler:
b .
.end
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example1.o -c example1.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler -Ttext-segment=0x00000000 -Map=example1.map -o example1.elf example1.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d example1.elf
example1.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <Reset_Handler-0x8>:
0: 00001000 .word 0x00001000
4: 00000008 .word 0x00000008
00000008 <Reset_Handler>:
8: e7fe b.n 8 <Reset_Handler>
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
重置\u处理程序:b
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as-o示例2.o-c示例2.s
/opt/arm/gcc-arm-8.2-2019.01-x86\u 64-arm-eabi/bin/arm-eabi-ld-g-e重置\u处理程序--节开始=.vectors=0x00000000-Ttext段=0x200000-Map=example2.Map-o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld:警告:“文本段”的地址不是最大页面大小的倍数
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump-d-j.vectors-j.text-d example2.elf
示例2.elf:文件格式elf32 littlearm
节向量的分解:
00000000 :
0:000011000.字0x000011000
4:20002000。单词0x20002000
第节的分解。正文:
20002000 :
20002000:e7fe b.n 20002000
.完
向量表仍然位于正确的内存位置,但代码现在位于0x20002000
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
为了描述为获得相同结果而使用的链接器脚本中所需的确切更改,我需要查看其内容。基本上有两种方法可以使用Keil控制代码区域的位置。使用散布文件,或使用“构建选项”对话框中的“目标”选项卡
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
您可以定义一个IROM区域,其中包括您希望代码所在的区域。您还可以使用此对话框生成初始散布文件,然后根据Keil文档修改散布文件
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
但是,您在这里给出的位置位于RAM区域,这有点不寻常(可能效率低下,但有效)。你有没有考虑过如何在重启后初始化你的目标
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
最大的问题是,在复位时,Cortex-M3总是从地址0、4(和8)读取数据(由于预取)。您需要提供初始堆栈指针(或不使用堆栈)和重置向量(使用位0,T位,set)。内存映射可能有硬件存储(特定于设备),但程序员的观点始终是这些获取从地址0开始。基本上有两种方法可以使用Keil控制代码区域的位置。使用散布文件,或使用“构建选项”对话框中的“目标”选项卡
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
您可以定义一个IROM区域,其中包括您希望代码所在的区域。您还可以使用此对话框生成初始散布文件,然后根据Keil文档修改散布文件
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
但是,您在这里给出的位置位于RAM区域,这有点不寻常(可能效率低下,但有效)。你有没有考虑过如何在重启后初始化你的目标
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-as -o example2.o -c example2.s
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld -g -e Reset_Handler --section-start=.vectors=0x00000000 -Ttext-segment=0x20002000 -Map=example2.map -o example2.elf example2.o
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-ld: warning: address of `text-segment' isn't multiple of maximum page size
/opt/arm/gcc-arm-8.2-2019.01-x86_64-arm-eabi/bin/arm-eabi-objdump -d -j .vectors -j .text -d example2.elf
example2.elf: file format elf32-littlearm
Disassembly of section .vectors:
00000000 <.vectors>:
0: 00001000 .word 0x00001000
4: 20002000 .word 0x20002000
Disassembly of section .text:
20002000 <Reset_Handler>:
20002000: e7fe b.n 20002000 <Reset_Handler>
.end
最大的问题是,在复位时,Cortex-M3总是从地址0、4(和8)读取数据,因为