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:
Philipp Oppermann
2015-08-22 13:14:47 +02:00
parent 4c793e6dd9
commit fcf69dcc53
2 changed files with 2 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ $(iso): $(kernel)
@rm -r build/isofiles
$(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 build

View File

@@ -22,7 +22,7 @@ SECTIONS {
.boot :
{
/* ensure that the multiboot header is at the beginning */
*(.multiboot)
KEEP(*(.multiboot))
}
.text :