of: Add support for linking device tree blobs into vmlinux
[linux-2.6.git] / include / asm-generic / vmlinux.lds.h
index bd69d79..05cbad0 100644 (file)
@@ -67,7 +67,8 @@
  * Align to a 32 byte boundary equal to the
  * alignment gcc 4.5 uses for a struct
  */
-#define STRUCT_ALIGN() . = ALIGN(32)
+#define STRUCT_ALIGNMENT 32
+#define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
 
 /* The actual configuration determine if the init/exit sections
  * are handled as text/data or they can be discarded (which
 #define TRACE_SYSCALLS()
 #endif
 
+
+#define KERNEL_DTB()                                                   \
+       STRUCT_ALIGN();                                                 \
+       VMLINUX_SYMBOL(__dtb_start) = .;                                \
+       *(.dtb.init.rodata)                                             \
+       VMLINUX_SYMBOL(__dtb_end) = .;
+
 /* .data section */
 #define DATA_DATA                                                      \
        *(.data)                                                        \
        MCOUNT_REC()                                                    \
        DEV_DISCARD(init.rodata)                                        \
        CPU_DISCARD(init.rodata)                                        \
-       MEM_DISCARD(init.rodata)
+       MEM_DISCARD(init.rodata)                                        \
+       KERNEL_DTB()
 
 #define INIT_TEXT                                                      \
        *(.init.text)                                                   \