Merge branch 'topic/workq-update' into topic/asoc
[firefly-linux-kernel-4.4.55.git] / usr / initramfs_data.S
index 49a545fea12019616cd1476cd8fa7c4eb0e5e279..c14322d1c0cfb9d7ad70bf70adce5f77dd8fe921 100644 (file)
   -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o
    ld -m elf_i386  -r -o built-in.o initramfs_data.o
 
-  initramfs_data.scr looks like this:
-SECTIONS
-{
-       .init.ramfs : { *(.data) }
-}
+  For including the .init.ramfs sections, see include/asm-generic/vmlinux.lds.
 
   The above example is for i386 - the parameters vary from architectures.
   Eventually look up LDFLAGS_BLOB in an older version of the
@@ -26,6 +22,17 @@ SECTIONS
 */
 
 #include <linux/stringify.h>
+#include <asm-generic/vmlinux.lds.h>
 
 .section .init.ramfs,"a"
+__irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
+__irf_end:
+.section .init.ramfs.info,"a"
+.globl VMLINUX_SYMBOL(__initramfs_size)
+VMLINUX_SYMBOL(__initramfs_size):
+#ifdef CONFIG_64BIT
+       .quad __irf_end - __irf_start
+#else
+       .long __irf_end - __irf_start
+#endif