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:
parent
565d322630
commit
6f9943822b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215436
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user