减小生成的内核镜像大小
This commit is contained in:
parent
bfd7530ae2
commit
59ebdf8e73
|
@ -33,7 +33,7 @@ ifdef release
|
|||
endif
|
||||
|
||||
ifeq (${ARCH},x86_64)
|
||||
RSCFLAGS := ${RSCFLAGS} -C target-feature=-sse,-avx
|
||||
RSCFLAGS := ${RSCFLAGS} -C target-feature=-sse
|
||||
endif
|
||||
|
||||
RUSTLIB_PATH = ../rustlib/${ARCH}/lib
|
||||
|
@ -54,6 +54,7 @@ metaverse.elf: kernel libk rust metaverse.lds
|
|||
@echo -e "\e[1;33mld\e[0m \e[1;32m$@\e[0m \e[34m<--\e[0m \e[32m${SUBOBJS}\e[0m"
|
||||
@ld -T metaverse.lds -Map=metaverse.map -unresolved-symbols=ignore-all -o $@ ${SUBOBJS} ${RUST_LIBS} \
|
||||
2>&1 | "${SOURCE}/colorize" "warning:=yellow" "error:=red" "ld=lyellow"
|
||||
@strip $@
|
||||
|
||||
.PHONY: kernel libk all clear postproc rust
|
||||
|
||||
|
|
|
@ -39,10 +39,6 @@ multiboot2_header:
|
|||
dd 8
|
||||
multiboot2_header_end:
|
||||
|
||||
section .kstack
|
||||
kstack:
|
||||
resb 0x1000000 - 0x400000
|
||||
|
||||
section .kend
|
||||
global kend
|
||||
kend:
|
||||
|
|
|
@ -17,12 +17,6 @@ SECTIONS {
|
|||
{
|
||||
*(.cpumeta)
|
||||
}
|
||||
. = 4M;
|
||||
..kstack :
|
||||
{
|
||||
kstack = .;
|
||||
*(.kstack)
|
||||
}
|
||||
. = 16M;
|
||||
.text :
|
||||
{
|
||||
|
|
Reference in New Issue