ROSE/link.ld

50 lines
942 B
Plaintext
Raw Normal View History

2022-09-14 16:50:44 -05:00
OUTPUT_FORMAT(binary)
ENTRY(entry)
SECTIONS {
. = 0x100000;
2022-09-14 16:50:44 -05:00
2023-02-08 10:33:49 -06:00
.text : {
*(.text);
2022-09-14 16:50:44 -05:00
}
2023-02-08 10:33:49 -06:00
.data : {
*(.data);
2023-02-10 19:20:17 -06:00
*(.data*);
*(.rodata);
*(.rodata*);
_edata = .;
2022-09-14 16:50:44 -05:00
}
.realmode 0x4000 :
2023-02-10 19:20:17 -06:00
AT ( _edata )
{ _v86code = .; *(.v86); _ev86code = .; }
2023-02-10 19:20:17 -06:00
. = _edata + SIZEOF(.realmode);
.thing : { _loadusercode = .; }
2023-02-10 19:20:17 -06:00
.usermode 0x400000 : AT(_loadusercode) {
_usercode = .; *(.user); _eusercode = .;
}
.bss 0x400000 (NOLOAD) : AT(_loadusercode + SIZEOF(.usermode)) {
_bprogstart = .;
2023-02-10 19:20:17 -06:00
*(.progbss);
*(.progbss*);
_bprogend = .;
2023-02-10 19:20:17 -06:00
*(.proglatebss);
*(.proglatebss*);
}
. = ADDR(.data) + SIZEOF(.data) + SIZEOF(.realmode) + SIZEOF(.usermode);
.bss : ALIGN(0x1000)
{
2023-02-10 19:20:17 -06:00
_bstart = .; *(.bss); *(.bss*) _bend = .;
}
/DISCARD/ : {
*(.note*)
*(.comment*)
2022-09-14 16:50:44 -05:00
}
}