Revert "batman: remove head.lds completely"
authorBernhard Urban <lewurm@gmail.com>
Tue, 18 Jan 2011 00:41:05 +0000 (01:41 +0100)
committerBernhard Urban <lewurm@gmail.com>
Tue, 18 Jan 2011 00:41:05 +0000 (01:41 +0100)
01:34:03 <@segher> yuck
01:34:13 <@segher> very bad plan
D:

This reverts commit 517cb72c0b4ccd2a80e70eab04b01420eaf43513.

batman/Makefile
batman/head.lds [new file with mode: 0644]

index a22b43228b60d12f259703c0fe49c2eddb41b5b6..8d9f5ac88010651087fae328e01b2819988d7638 100644 (file)
@@ -69,9 +69,9 @@ FILE_V28: head.bin exploit.bin $(loader)
        $(Q)./pack.sh $@ $^
        $(Q)$(TOOLS)/lego-cksum $@
 
-head.bin: head.o
+head.bin: head.elf
        @echo "  OBJCOPY   $@"
-       $(Q)$(OBJCOPY) -Ielf32-powerpc -Obinary $< $@
+       $(Q)$(OBJCOPY) -Obinary $< $@
 
 exploit.bin: exploit.elf
        @echo "  OBJCOPY   $@"
@@ -81,6 +81,10 @@ exploit.elf: lego.lds exploit.o
        @echo "  LINK      $@"
        $(Q)$(LD) -T $^ -o $@
 
+head.elf: head.lds head.o
+       @echo "  LINK      $@"
+       $(Q)$(LD) -T $^ -o $@
+
 exploit.o: exploit.s
        @echo "  ASSEMBLE  $@"
        $(Q)$(CC) $(CFLAGS) -c $< -o $@
diff --git a/batman/head.lds b/batman/head.lds
new file mode 100644 (file)
index 0000000..0e91c43
--- /dev/null
@@ -0,0 +1,6 @@
+/* Copyright 2008-2009  Segher Boessenkool  <segher@kernel.crashing.org>
+   This code is licensed to you under the terms of the GNU GPL, version 2;
+   see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt  */
+
+OUTPUT_FORMAT("elf32-powerpc")
+OUTPUT_ARCH(powerpc:common)