mirror of https://github.com/tailix/loadwarka.git
Add linker scripts
This commit is contained in:
parent
b1c943c245
commit
61d542720e
4
build.sh
4
build.sh
|
@ -9,7 +9,7 @@ CROSS="$BIN/i386-elf-"
|
||||||
|
|
||||||
${CROSS}gcc -c src/x86_stage1.S -o src/x86_stage1.o
|
${CROSS}gcc -c src/x86_stage1.S -o src/x86_stage1.o
|
||||||
${CROSS}gcc -c src/x86_stage2.S -o src/x86_stage2.o
|
${CROSS}gcc -c src/x86_stage2.S -o src/x86_stage2.o
|
||||||
${CROSS}ld -Ttext 200000 --oformat binary -o src/x86_stage1.bin src/x86_stage1.o
|
${CROSS}ld -Tsrc/x86_stage1.ld --oformat binary -o src/x86_stage1.bin src/x86_stage1.o
|
||||||
${CROSS}ld -Ttext 200000 --oformat binary -o src/x86_stage2.bin src/x86_stage2.o
|
${CROSS}ld -Tsrc/x86_stage2.ld --oformat binary -o src/x86_stage2.bin src/x86_stage2.o
|
||||||
./testyboot mbr mbr.bin src/x86_stage1.bin
|
./testyboot mbr mbr.bin src/x86_stage1.bin
|
||||||
cat mbr.bin src/x86_stage2.bin > disk.img
|
cat mbr.bin src/x86_stage2.bin > disk.img
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
OUTPUT_ARCH("i386")
|
||||||
|
ENTRY(_start)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
. = 0x7c00;
|
||||||
|
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
*(.text);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
OUTPUT_ARCH("i386")
|
||||||
|
ENTRY(_start)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
. = 0x7e00;
|
||||||
|
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
*(.text);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue