toaruos/kernel/link.ld

50 lines
653 B
Plaintext
Raw Normal View History

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)
phys = 0x00100000;
SECTIONS
{
2011-03-05 03:18:14 +03:00
/*
* Actual code
*/
2011-01-16 04:01:19 +03:00
.text phys : AT(phys) {
code = .;
*(.text)
*(.rodata)
. = ALIGN(4096);
}
2011-03-05 03:18:14 +03:00
/*
* Kernel data
*/
2011-01-16 04:01:19 +03:00
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
2011-03-05 03:18:14 +03:00
/*
* Statically defined, uninitialized values
*/
2011-01-16 04:01:19 +03:00
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
2011-03-05 03:18:14 +03:00
/*
* End of kernel.
*/
2011-01-16 04:01:19 +03:00
end = .;
2011-03-05 03:18:14 +03:00
/*
* Get rid of unnecessary GCC bits.
*/
2011-01-18 02:04:12 +03:00
/DISCARD/ :
{
*(.comment)
*(.eh_frame)
*(.note.gnu.build-id)
}
2011-01-16 04:01:19 +03:00
}