/* from http://dc0d32.blogspot.com/2010/06/real-mode-in-c-with-gcc-writing.html */ ENTRY(main); SECTIONS { . = 0x8000; .text : AT(0x8000) { _text = .; *(.text); _text_end = .; } .data : { _data = .; *(.bss); *(.bss*); *(.data); *(.rodata*); *(COMMON) _data_end = .; } /* .sig : AT(0x7DFE) { SHORT(0xaa55); } */ /DISCARD/ : { *(.note*); *(.iplt*); *(.igot*); *(.rel*); *(.comment); /* add any unwanted sections spewed out by your version of gcc and flags here */ } }