/*1initramfs_data includes the compressed binary that is the2filesystem used for early user space.3Note: Older versions of "as" (prior to binutils 2.11.90.0.234released on 2001-07-14) dit not support .incbin.5If you are forced to use older binutils than that then the6following trick can be applied to create the resulting binary:789ld -m elf_i386 --format binary --oformat elf32-i386 -r \10-T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o11ld -m elf_i386 -r -o built-in.o initramfs_data.o1213For including the .init.ramfs sections, see include/asm-generic/vmlinux.lds.1415The above example is for i386 - the parameters vary from architectures.16Eventually look up LDFLAGS_BLOB in an older version of the17arch/$(ARCH)/Makefile to see the flags used before .incbin was introduced.1819Using .incbin has the advantage over ld that the correct flags are set20in the ELF header, as required by certain architectures.21*/2223#include <linux/stringify.h>24#include <asm-generic/vmlinux.lds.h>2526.section .init.ramfs,"a"27__irf_start:28.incbin __stringify(INITRAMFS_IMAGE)29__irf_end:30.section .init.ramfs.info,"a"31.globl VMLINUX_SYMBOL(__initramfs_size)32VMLINUX_SYMBOL(__initramfs_size):33#ifdef CONFIG_64BIT34.quad __irf_end - __irf_start35#else36.long __irf_end - __irf_start37#endif383940