sh: Fix up link error on SH-2 zImage with older binutils.
authorYoshinori Sato <ysato@users.sourceforge.jp>
Fri, 4 Jul 2008 03:54:51 +0000 (12:54 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jul 2008 09:10:33 +0000 (18:10 +0900)
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boot/compressed/Makefile_32
arch/sh/boot/compressed/Makefile_64
arch/sh/boot/compressed/piggy.S [new file with mode: 0644]
arch/sh/boot/compressed/vmlinux.scr [deleted file]

index c0d25fb1aa608bb4829294d0907bde736a02f82c..47685f618ae748e504bc76a99a5f3a8b822f6534 100644 (file)
@@ -35,8 +35,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
        $(call if_changed,gzip)
 
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
 OBJCOPYFLAGS += -R .empty_zero_page
 
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
-       $(call if_changed,ld)
+$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
+       $(call if_changed,as_o_S)
index 912f3e205a0d38678c532cff4a884f80fd541d77..658d4f91555679b474e8c3c12fc00665fd5ef197 100644 (file)
@@ -37,8 +37,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
        $(call if_changed,gzip)
 
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
 OBJCOPYFLAGS += -R .empty_zero_page
 
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
-       $(call if_changed,ld)
+$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
+       $(call if_changed,as_o_S)
diff --git a/arch/sh/boot/compressed/piggy.S b/arch/sh/boot/compressed/piggy.S
new file mode 100644 (file)
index 0000000..5660719
--- /dev/null
@@ -0,0 +1,8 @@
+       .global input_len, input_data
+       .data
+input_len:
+       .long   input_data_end - input_data
+input_data:
+       .incbin "arch/sh/boot/compressed/vmlinux.bin.gz"
+input_data_end:
+       .end
diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr
deleted file mode 100644 (file)
index 1ed9d79..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-SECTIONS
-{
-  .data : { 
-       input_len = .;
-       LONG(input_data_end - input_data) input_data = .; 
-       *(.data) 
-       input_data_end = .; 
-       }
-}