link in the prelude object
parent
559a4275ba
commit
e20030fbc3
@ -1,7 +1,12 @@
|
||||
%include "defines.s"
|
||||
|
||||
[org BOOT1_LOADPOINT]
|
||||
[bits 16]
|
||||
|
||||
section .prelude
|
||||
|
||||
extern boot1_bin_len
|
||||
|
||||
global prelude
|
||||
prelude:
|
||||
hlt
|
||||
dd boot1_bin_len
|
||||
|
||||
@ -1,10 +1,34 @@
|
||||
OUTPUT_FORMAT("binary")
|
||||
. = 0x9000;
|
||||
SECTIONS {
|
||||
.text : { *(.text); *(.text.*) }
|
||||
.data : { *(.data); *(.data.*) }
|
||||
.bss : { *(.bss); *(.bss.*) }
|
||||
.rodata : { *(.rodata); *(.rodata.*) }
|
||||
}
|
||||
|
||||
. = 0x8200;
|
||||
|
||||
SECTIONS {
|
||||
.prelude : {
|
||||
*(.prelude)
|
||||
}
|
||||
|
||||
.text : {
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
}
|
||||
|
||||
.data : {
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
}
|
||||
|
||||
.bss : {
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
}
|
||||
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
}
|
||||
|
||||
/* Define a symbol for the total length of the binary, so the prelude knows how many blocks to
|
||||
* load from disk.
|
||||
*/
|
||||
boot1_bin_len = . - 0x8200;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue