From f54c68a085c376bf5e2d64b50aab28a3f46d0eac Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Fri, 5 Sep 2008 17:03:42 -0400 Subject: [PATCH 1/1] Now generate an ELF. --- aseg/Makefile | 10 ++++++++++ aseg/aseg.lds | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 aseg/Makefile create mode 100644 aseg/aseg.lds diff --git a/aseg/Makefile b/aseg/Makefile new file mode 100644 index 0000000..f86bc2a --- /dev/null +++ b/aseg/Makefile @@ -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 index 0000000..2d805bb --- /dev/null +++ b/aseg/aseg.lds @@ -0,0 +1,11 @@ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) +SECTIONS +{ + . = 0xA8000; + + .aseg 0xA8000 : { + _start = .; + aseg.o + } +} -- 2.43.0