mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Remove unused sections to avoid float issues
Avoids a linker error for `fmod` and `fmodf`. These functions are refenced in libcore. The KEEP ensures that the Multiboot section isn't removed.
This commit is contained in:
2
Makefile
2
Makefile
@@ -44,7 +44,7 @@ $(iso): $(kernel)
|
|||||||
@rm -r build/isofiles
|
@rm -r build/isofiles
|
||||||
|
|
||||||
$(kernel): cargo $(rust_os) $(assembly_object_files) $(linker_script)
|
$(kernel): cargo $(rust_os) $(assembly_object_files) $(linker_script)
|
||||||
@ld -n -T $(linker_script) -o $(kernel) $(assembly_object_files) $(rust_os)
|
@ld -n --gc-sections -T $(linker_script) -o $(kernel) $(assembly_object_files) $(rust_os)
|
||||||
|
|
||||||
cargo:
|
cargo:
|
||||||
@cargo build
|
@cargo build
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ SECTIONS {
|
|||||||
.boot :
|
.boot :
|
||||||
{
|
{
|
||||||
/* ensure that the multiboot header is at the beginning */
|
/* ensure that the multiboot header is at the beginning */
|
||||||
*(.multiboot)
|
KEEP(*(.multiboot))
|
||||||
}
|
}
|
||||||
|
|
||||||
.text :
|
.text :
|
||||||
|
|||||||
Reference in New Issue
Block a user