Linux内核的连接脚本之设置内核的入口地址

01_ENTRY
http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX322
ENTRY(symbol):
在链接脚本中,指定第一个要执行的指令。
例如,在U-Boot中的链接脚本中,指定:
u-boot-1.1.6\board\100ask24x0\u-boot.lds

ENTRY(_start)

_start是在start.S中定义的一个标签,它后面是异常向量表
u-boot-1.1.6\cpu\arm920t\start.S

.globl _start
_start: b reset //address:0x00
ldr pc, _undefined_instruction //address:0x04
ldr pc, _software_interrupt //address:0x08
ldr pc, _prefetch_abort //address:0x0c
ldr pc, _data_abort //address:0x10
ldr pc, _not_used //address:0x14
ldr pc, _irq //address:0x18
ldr pc, _fiq //address:0x1c

_undefined_instruction: .word undefined_instruction
_software_interrupt: .word software_interrupt
_prefetch_abort: .word prefetch_abort
_data_abort: .word data_abort
_not_used: .word not_used
_irq: .word irq
_fiq: .word fiq

猜你喜欢

转载自blog.csdn.net/wzc18743083828/article/details/100544267