Add the definition of initramfs to vmlinux.lds.h
This simplifies arch lds script a bit.

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---

Is these 8 lines really worth it.
I think yes - but no less than this.

        Sam


 include/asm-generic/vmlinux.lds.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h 
b/include/asm-generic/vmlinux.lds.h
index 5388c41..0e3d2eb 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -140,6 +140,19 @@
 /* for backward compatibility */
 #define RODATA RO_DATA(4096)
 
+/* INITRAMFS is used to hold the filesystem used during early boot. */
+#ifdef CONFIG_BLK_DEV_INITRD
+#define INITRAMFS(align)                                               \
+       . = ALIGN((align));                                             \
+       .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {             \
+       VMLINUX_SYMBOL(__initramfs_start) = .;                          \
+               *(.init.ramfs)                                          \
+       VMLINUX_SYMBOL(__initramfs_end) = .;                            \
+       }
+#else
+#define INITRAMFS(align)
+#endif
+
 #define SECURITY_INIT                                                  \
        .security_initcall.init : AT(ADDR(.security_initcall.init) - 
LOAD_OFFSET) { \
                VMLINUX_SYMBOL(__security_initcall_start) = .;          \
-- 
1.5.1.rc3.20.gaa453

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to