2012-01-11 04:42:46 +04:00
|
|
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
2011-03-05 03:18:14 +03:00
|
|
|
* Kernel linker script for x86
|
|
|
|
*/
|
2011-01-18 02:04:12 +03:00
|
|
|
OUTPUT_FORMAT(elf32-i386)
|
2011-01-16 04:01:19 +03:00
|
|
|
ENTRY(start)
|
2015-05-20 10:12:20 +03:00
|
|
|
|
2011-01-16 04:01:19 +03:00
|
|
|
SECTIONS
|
|
|
|
{
|
2015-05-20 10:12:20 +03:00
|
|
|
. = 1M;
|
|
|
|
phys = .;
|
|
|
|
|
|
|
|
.text BLOCK(4K) : ALIGN(4K)
|
|
|
|
{
|
2011-01-16 04:01:19 +03:00
|
|
|
code = .;
|
2015-05-20 10:12:20 +03:00
|
|
|
*(.multiboot)
|
|
|
|
*(.text)
|
|
|
|
}
|
|
|
|
|
|
|
|
.rodata BLOCK(4K) : ALIGN(4K)
|
|
|
|
{
|
|
|
|
*(.rodata)
|
2011-01-16 04:01:19 +03:00
|
|
|
}
|
2015-05-20 10:12:20 +03:00
|
|
|
|
|
|
|
.data BLOCK(4K) : ALIGN(4K)
|
2011-01-16 04:01:19 +03:00
|
|
|
{
|
|
|
|
data = .;
|
2015-05-20 10:12:20 +03:00
|
|
|
*(.data)
|
|
|
|
*(.symbols)
|
2014-03-10 06:36:28 +04:00
|
|
|
PROVIDE(kernel_symbols_start = .);
|
|
|
|
PROVIDE(kernel_symbols_end = .);
|
2011-01-16 04:01:19 +03:00
|
|
|
}
|
2015-05-20 10:12:20 +03:00
|
|
|
|
|
|
|
.bss BLOCK(4K) : ALIGN(4K)
|
2011-01-16 04:01:19 +03:00
|
|
|
{
|
|
|
|
bss = .;
|
2015-05-20 10:12:20 +03:00
|
|
|
*(COMMON)
|
|
|
|
*(.bss)
|
|
|
|
*(.stack)
|
2011-01-16 04:01:19 +03:00
|
|
|
}
|
2015-05-20 10:12:20 +03:00
|
|
|
|
2011-01-16 04:01:19 +03:00
|
|
|
end = .;
|
2015-05-20 10:12:20 +03:00
|
|
|
|
2011-01-18 02:04:12 +03:00
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.comment)
|
|
|
|
*(.eh_frame)
|
|
|
|
*(.note.gnu.build-id)
|
|
|
|
}
|
2011-01-16 04:01:19 +03:00
|
|
|
}
|