STANDALONE_LOAD_ADDR = 0x40000
PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
+
+LDFLAGS += --cref --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections
_i386boot_bss_size = SIZEOF(.bss);
/* 16bit realmode trampoline code */
- .realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { *(.realmode) }
+ .realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { KEEP(*(.realmode)) }
_i386boot_realmode = LOADADDR(.realmode);
_i386boot_realmode_size = SIZEOF(.realmode);
/* 16bit BIOS emulation code (just enough to boot Linux) */
- .bios 0 : AT ( LOADADDR(.realmode) + SIZEOF(.realmode) ) { *(.bios) }
+ .bios 0 : AT ( LOADADDR(.realmode) + SIZEOF(.realmode) ) { KEEP(*(.bios)) }
_i386boot_bios = LOADADDR(.bios);
_i386boot_bios_size = SIZEOF(.bios);
* The fff0 offset of resetvec is important, however.
*/
. = 0xfffffe00;
- .start32 : AT (TEXT_BASE + 0x3fe00) { *(.start32); }
+ .start32 : AT (TEXT_BASE + 0x3fe00) { KEEP(*(.start32)); }
. = 0xf800;
- .start16 : AT (TEXT_BASE + 0x3f800) { *(.start16); }
+ .start16 : AT (TEXT_BASE + 0x3f800) { KEEP(*(.start16)); }
. = 0xfff0;
- .resetvec : AT (TEXT_BASE + 0x3fff0) { *(.resetvec); }
+ .resetvec : AT (TEXT_BASE + 0x3fff0) { KEEP(*(.resetvec)); }
_i386boot_end = (LOADADDR(.resetvec) + SIZEOF(.resetvec) );
}