mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Use --gc-sections to remove unused program sections
This commit is contained in:
2
Makefile
2
Makefile
@@ -30,7 +30,7 @@ $(iso): $(kernel) $(grub_cfg)
|
||||
@rm -r build/isofiles
|
||||
|
||||
$(kernel): kernel $(rust_os) $(assembly_object_files) $(linker_script)
|
||||
@ld -n -T $(linker_script) -o $(kernel) \
|
||||
@ld -n --gc-sections -T $(linker_script) -o $(kernel) \
|
||||
$(assembly_object_files) $(rust_os)
|
||||
|
||||
kernel:
|
||||
|
||||
Reference in New Issue
Block a user