summaryrefslogtreecommitdiffstats
path: root/usr/initramfs_data.S
diff options
context:
space:
mode:
Diffstat (limited to 'usr/initramfs_data.S')
-rw-r--r--usr/initramfs_data.S16
1 files changed, 11 insertions, 5 deletions
diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S
index 49a545fea120..b9efed5e35cc 100644
--- a/usr/initramfs_data.S
+++ b/usr/initramfs_data.S
@@ -11,11 +11,7 @@
-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
@@ -28,4 +24,14 @@ SECTIONS
#include <linux/stringify.h>
.section .init.ramfs,"a"
+__irf_start:
.incbin __stringify(INITRAMFS_IMAGE)
+__irf_end:
+.section .init.ramfs.info,"a"
+.globl __initramfs_size
+__initramfs_size:
+#ifdef CONFIG_32BIT
+ .long __irf_end - __irf_start
+#else
+ .quad __irf_end - __irf_start
+#endif