1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader does

not clear .bss automatically.

Approved by:	nwhitehorn (mentor)
This commit is contained in:
Andreas Tobler 2010-11-17 19:28:48 +00:00
parent 565d322630
commit 6f9943822b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215436

View File

@ -50,7 +50,20 @@ _start: \n\
addi %r1,%r1,stack@l \n\
addi %r1,%r1,16384 \n\
\n\
b startup \n\
/* Clear the .bss!!! */ \n\
li %r0,0 \n\
lis %r8,_edata@ha \n\
addi %r8,%r8,_edata@l\n\
lis %r9,_end@ha \n\
addi %r9,%r9,_end@l \n\
\n\
1: cmpw 0,%r8,%r9 \n\
bge 2f \n\
stw %r0,0(%r8) \n\
addi %r8,%r8,4 \n\
b 1b \n\
\n\
2: b startup \n\
");
void