From c0693941fdb5118164a8161316fdf8e9ebb499d2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 10 Jun 2009 21:56:01 -0400 Subject: Do garbage collection of unused sections. Implement -ffunction-sections and -fdata-sections in both 32bit and 16bit code. Make sure all sections have unique names (even asm and discarded sections). Enhance tools/layoutrom.py script to find all sections reachable from exported 16bit code - prune all other sections. Mark sections with "export" if they can be visible outside of code - these sections wont be dropped when pruning unused sections. --- vgasrc/vgalayout.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vgasrc/vgalayout.lds.S') diff --git a/vgasrc/vgalayout.lds.S b/vgasrc/vgalayout.lds.S index b5f0319f..08a5f32e 100644 --- a/vgasrc/vgalayout.lds.S +++ b/vgasrc/vgalayout.lds.S @@ -10,7 +10,7 @@ ENTRY(_optionrom_entry) SECTIONS { .text 0 : { - *(.rom.header) + KEEP(*(.rom.header)) *(.text.*) _rodata = . ; *(.rodata.__func__.*) -- cgit