]> Joshua Wise's Git repositories - netwatch.git/commitdiff
Now generate an ELF.
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 5 Sep 2008 21:03:42 +0000 (17:03 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 5 Sep 2008 21:03:42 +0000 (17:03 -0400)
aseg/Makefile [new file with mode: 0644]
aseg/aseg.lds [new file with mode: 0644]

diff --git a/aseg/Makefile b/aseg/Makefile
new file mode 100644 (file)
index 0000000..f86bc2a
--- /dev/null
@@ -0,0 +1,10 @@
+all: aseg.elf
+
+aseg.bin: aseg.asm
+       nasm -o aseg.bin aseg.asm
+
+aseg.o: aseg.bin
+       objcopy -I binary -B i386 -O elf32-i386 aseg.bin aseg.o
+
+aseg.elf: aseg.bin aseg.lds
+       ld -o aseg.elf -T aseg.lds
\ No newline at end of file
diff --git a/aseg/aseg.lds b/aseg/aseg.lds
new file mode 100644 (file)
index 0000000..2d805bb
--- /dev/null
@@ -0,0 +1,11 @@
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+SECTIONS
+{
+       . = 0xA8000;
+       
+       .aseg 0xA8000 : {
+               _start = .;
+               aseg.o
+       }
+}
This page took 0.027545 seconds and 4 git commands to generate.