1.5.1. clear_bss

clear_bss:1
	ldr	r0, _bss_start2		/* find start of bss segment        */
	ldr	r1, _bss_end3		/* stop here                        */
	mov 	r2, #0x00000000		/* clear                            */
        

2

此处的_bss_start是:

.globl _bss_start
_bss_start:
	.word __bss_start
                

3

而_bss_end,是:

.globl _bss_end
_bss_end:
	.word _end
                

1

对应的,__bss_start和_end,都在前面提到过的那个链接脚本里面:

u-boot-1.1.6_20100601\opt\EmbedSky\u-boot-1.1.6\board\EmbedSky\u-boot.lds

中的:

	__bss_start = .;
	.bss : { *(.bss) }
	_end = .;
                

即bss段的起始地址和结束地址。