Silo - Modern Toolchain - Without elftoaout
I have a team of people trying to figure out how to remove elftoaout from the Kernel and Silo builds.
We started with silo, because it won't compile with a modern toolchain, and after we get these techniques developed, it could then be merged into the kernel to also remove the depency on elftoaout.
You will need to use a 2.16.1 binutils with a patch that's going to be merged into the main tree.
http://sourceware.org/ml/binutils/2005-10/msg00420.html
Now we got the first.b to build with the patch at the end of this email, which shows our proof concept. When we tried to apply our ideas to second.b that's where we ran into a problem, because of the gzipping and whatever the util program does to the compiled object. If anyone has any suggestions on how to get around that issue, feel free to send me an email, we will try anything. We are thinking we will have to utilize an linker.script, but that's as far as we have gone and hence my email to sparc liinux community.
Patch for first/Makefile
Makefile 2005-10-11 14:47:54.000000000 -0700 renamed from Makefile.orig 2005-10-11 14:30:12.000000000 -0700 +0 -0
@@ -41,12 +41,12 @@ $(STRIP) first
first.b: first
- $(ELFTOAOUT) -o first.b first
+ $(OBJCOPY) -O a.out-sunos-big first first.b
echo -n 'SILO'$(IMGVERSION) | $(DD) of=first.b bs=8 conv=notrunc
seek=3 count=1
$(DD) if=/dev/zero of=first.b bs=4 count=1 seek7ultra.o: ultra.S
- $(CC) $(CFLAGS) -c -Wa,-Av9a ultra.S
+ $(CC) $(CFLAGS) -Wa,-Av9a -c ultra.S
ultra: ultra.o
$(LD) $(LDFLAGS) -o ultra ultra.o
@@ -54,13 +54,13 @@
$(STRIP) ultraultra.b: ultra
- $(ELFTOAOUT) -o ultra.b ultra
+ $(OBJCOPY) -I elf32-sparc -O a.out-sunos-big ultra ultra.b
echo -n 'SILO'$(IMGVERSION) | $(DD) of=ultra.b bs=8 conv=notrunc
seek=3 count=1
echo -n -e '\340' | $(DD) of=ultra.b bs=1 count=1 seek=7
conv=notrunc
$(DD) if=/dev/zero of=ultra.b bs=4 count=1 seek7generic.o: generic.S
- $(CC) $(CFLAGS) -c -Wa,-Av9a generic.S
+ $(CC) $(CFLAGS) -Wa,-Av9a -c generic.S
generic: generic.o
$(LD) $(LDFLAGS) -o generic generic.o
@@ -68,13 +68,13 @@
$(STRIP) genericgeneric.b: generic
- $(ELFTOAOUT) -o generic.b generic
+ $(OBJCOPY) -I elf32-sparc -O a.out-sunos-big generic generic.b
echo -n 'SILO'$(IMGVERSION) | $(DD) of=generic.b bs=8
conv=notrunc seek=3 count=1
echo -n -e '\340' | $(DD) of=generic.b bs=1 count=1 seek=7
conv=notrunc
$(DD) if=/dev/zero of=generic.b bs=4 count=1 seek%5fd.o: fd.S
- $(CC) $(CFLAGS) -c -Wa,-Av9a fd.S
+ $(CC) $(CFLAGS) -Wa,-Av9a -c fd.S
fd: fd.o
$(LD) $(LDFLAGS) -o fd fd.o
@@ -82,7 +82,7 @@
$(STRIP) fdfd.b: fd
- $(ELFTOAOUT) -o fd.b fd
+ $(OBJCOPY) -I elf32-sparc -O a.out-sunos-big fd fd.b
echo -n 'SILO'$(IMGVERSION) | $(DD) ofý.b bs=8 conv=notrunc
seek=3 count=1
echo -n -e '\340' | $(DD) ofý.b bs=1 count=1 seek=7 conv=notrunc
$(DD) if=/dev/zero ofý.b bs=4 count=1 seek%5Signature · 3 lines
---- Jim Gifford [email protected]