Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-26011-2376549
LoOS-2141
Commits
839c9b5e
Commit
839c9b5e
authored
11 months ago
by
misane
Browse files
Options
Download
Patches
Plain Diff
fix: fix heap start and heap end; init .bss section for uninit-issue
parent
10aa6567
oscomp2024
busybox-copy-pagetable-fix
chores-build-system
devel
devel-busybox-vmfix
docs-vfs
fs-final-test-judge
fs-final-test-judge2
judge-test-final
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/loongarch64.lds
+6
-2
scripts/loongarch64.lds
src/core/_start.c
+6
-0
src/core/_start.c
with
12 additions
and
2 deletions
+12
-2
scripts/loongarch64.lds
+
6
−
2
View file @
839c9b5e
...
...
@@ -21,9 +21,11 @@ SECTIONS
}
. = ALIGN(16);
_bss_start = .;
.bss : {
*(.bss)
}
_bss_end = .;
_stack_top = ALIGN(16);
. = _stack_top + 0x4000;
...
...
@@ -32,8 +34,10 @@ SECTIONS
end = .;
_end = .;
_heap_start = ALIGN(0x1000);
_heap_end = _heap_start + 0x20000;
. = ALIGN(0x1000);
_heap_start = .;
. = _heap_start + 0x20000;
_heap_end = .;
_kernel_end = .;
kernel_end = .;
...
...
This diff is collapsed.
Click to expand it.
src/core/_start.c
+
6
−
0
View file @
839c9b5e
#include
"asm/cpu.h"
#include
"klib.h"
extern
int
kmain
();
extern
char
_stack_pointer
;
extern
char
_bss_start
,
_bss_end
;
void
_start
()
{
void
*
ksp
=
&
_stack_pointer
-
0x20
;
w_sp
((
uint64_t
)
ksp
);
intr_off
();
memset
(
&
_bss_start
,
0
,
&
_bss_end
-&
_bss_start
);
kmain
();
while
(
1
);
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets