2011-04-07 01:50:37 +04:00
|
|
|
/*
|
|
|
|
* Userspace Application Linker Script
|
|
|
|
* 2011, ToAruOS
|
|
|
|
*/
|
|
|
|
OUTPUT_FORMAT(elf32-i386)
|
|
|
|
ENTRY(_start)
|
|
|
|
STARTUP(loader/crtbegin.o)
|
2011-04-12 01:51:31 +04:00
|
|
|
INPUT(loader/syscall.o)
|
2011-04-07 01:50:37 +04:00
|
|
|
phys = 0x02000000;
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Actual code
|
|
|
|
*/
|
|
|
|
.text phys : AT(phys) {
|
|
|
|
code = .;
|
|
|
|
*(.text)
|
|
|
|
*(.rodata)
|
|
|
|
. = ALIGN(4096);
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* Kernel data
|
|
|
|
*/
|
|
|
|
.data : AT(phys + (data - code))
|
|
|
|
{
|
|
|
|
data = .;
|
|
|
|
*(.data)
|
|
|
|
. = ALIGN(4096);
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* Statically defined, uninitialized values
|
|
|
|
*/
|
|
|
|
.bss : AT(phys + (bss - code))
|
|
|
|
{
|
|
|
|
bss = .;
|
|
|
|
*(.bss)
|
|
|
|
. = ALIGN(4096);
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* Get rid of unnecessary GCC bits.
|
|
|
|
*/
|
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.comment)
|
|
|
|
*(.eh_frame)
|
|
|
|
*(.note.gnu.build-id)
|
|
|
|
}
|
|
|
|
}
|