projects
/
bootcensus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hacking the 1st stage loader
[bootcensus]
/
pcboot.ld
diff --git
a/pcboot.ld
b/pcboot.ld
index
f629124
..
28fb7e6
100644
(file)
--- a/
pcboot.ld
+++ b/
pcboot.ld
@@
-1,10
+1,20
@@
OUTPUT_ARCH(i386)
SECTIONS {
OUTPUT_ARCH(i386)
SECTIONS {
- /* BIOS will load us at 0x7c000h */
- . = 0x7c000;
+ /* BIOS loads the boot code at 0000:7c00 */
+ . = 0x7c00;
.boot : { * (.boot); }
.boot : { * (.boot); }
+
+ /* second stage boot loader */
+ .boot2 : { * (.boot2); }
+ _boot2_size = SIZEOF(.boot2);
+
+ /* main program will be loaded at 1MB by the second stage
+ * boot loader
+ */
+ . = 1M;
+
.startup : { * (.startup); }
.text : { * (.text); }
.rodata : { * (.rodata); }
.startup : { * (.startup); }
.text : { * (.text); }
.rodata : { * (.rodata); }