kernel presentation at ILUG on Sat.

Jason Clinton me at jasonclinton.com
Mon May 5 17:51:11 CDT 2003


Charles Steinkuehler wrote:

> objcopy -O binary -R .note -R .comment -S
> /home/usr/src/linux-2.4.21-rc1-ac3/vmlinux $tmppiggy; > gzip -f -9 < $tmppiggy > $tmppiggy.gz; > 
echo "SECTIONS { .data : { input_len = .; LONG(input_data_end -
> input_data) input_data = .; *(.data) input_data_end = .; }}" >
> $tmppiggy.lnk; > ld -m elf_i386 -r -o piggy.o -b binary $tmppiggy.gz -b elf32-i386 -T
> $tmppiggy.lnk; > rm -f $tmppiggy $tmppiggy.gz $tmppiggy.lnk
> ld -m elf_i386 -Ttext 0x100000 -e startup_32 -o bvmlinux head.o misc.o
> piggy.o
> make[2]: Leaving directory
> `/home/usr/src/linux-2.4.21-rc1-ac3/arch/i386/boot/compressed'
> objcopy -O binary -R .note -R .comment -S compressed/bvmlinux
> compressed/bvmlinux.out
> tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
> Root device is (9, 1)
> Boot sector 512 bytes.
> Setup is 4789 bytes.
> System is 862 kB
> make[1]: Leaving directory
> `/home/usr/src/linux-2.4.21-rc1-ac3/arch/i386/boot'
> [root at localhost linux-2.4.21-rc1-ac3]#

Also, is this (realatively) how one might go about creating a
self-extracting ELF binary?

--
Jason Clinton
I don't believe in witty sigs.





More information about the Kclug mailing list