luciaos/link.ld

36 lines
716 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);
*(.rodata);
*(.rodata*);
_edata = .;
2022-09-14 16:50:44 -05:00
}
.realmode 0x4000 :
AT ( ADDR(.data) + SIZEOF(.data) )
{ _v86code = .; *(.v86); _ev86code = .; }
. = ADDR(.data) + SIZEOF(.data) + SIZEOF(.realmode);
.thing : { _loadusercode = .; }
.usermode 0x400000 :
AT ( ADDR(.data) + SIZEOF(.data) + SIZEOF(.realmode) )
{ _usercode = .; *(.user); _eusercode = .; }
. = ADDR(.data) + SIZEOF(.data) + SIZEOF(.realmode) + SIZEOF(.usermode);
.bss : ALIGN(0x1000)
{
_bstart = .; *(.bss); _bend = .;
2022-09-14 16:50:44 -05:00
}
}