Commit 059a6c6d authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

add linker script for loader

Primarily to ensure that everything but the text section gets excluded.
parent 2bf2179e
......@@ -88,8 +88,8 @@ kernel.bin: kernel.o
threads/loader.o: threads/loader.S
$(CC) -c $< -o $@ $(ASFLAGS) $(CPPFLAGS) $(DEFINES)
loader.bin: threads/loader.o
$(LD) -N -e 0 -Ttext 0x7c00 --oformat binary -o $@ $<
loader.bin: threads/loader.o ../../threads/loader.lds
$(LD) -N -T../../threads/loader.lds -o $@ $<
os.dsk: kernel.bin
cat $^ > $@
......
OUTPUT_FORMAT("binary")
OUTPUT_ARCH(i386)
SECTIONS
{
. = 0x7c00;
.text : {
*(.text)
. = 512;
}
/DISCARD/ : { *(.*) }
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment