]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-generic/vmlinux.lds.h
Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2
[linux-2.6-omap-h63xx.git] / include / asm-generic / vmlinux.lds.h
index 53e21f36a802b9a067da15ffcb57a5ef9ec66a6b..a654d724d3b05b7d1e6a280d994f2a3f4df58dd1 100644 (file)
        VMLINUX_SYMBOL(__start___tracepoints) = .;                      \
        *(__tracepoints)                                                \
        VMLINUX_SYMBOL(__stop___tracepoints) = .;                       \
+       /* implement dynamic printk debug */                            \
+       . = ALIGN(8);                                                   \
+       VMLINUX_SYMBOL(__start___verbose) = .;                          \
+       *(__verbose)                                                    \
+       VMLINUX_SYMBOL(__stop___verbose) = .;                           \
        LIKELY_PROFILE()                                                \
        BRANCH_PROFILE()
 
        CPU_DISCARD(init.data)                                          \
        CPU_DISCARD(init.rodata)                                        \
        MEM_DISCARD(init.data)                                          \
-       MEM_DISCARD(init.rodata)                                        \
-       /* implement dynamic printk debug */                            \
-       VMLINUX_SYMBOL(__start___verbose_strings) = .;                  \
-       *(__verbose_strings)                                            \
-       VMLINUX_SYMBOL(__stop___verbose_strings) = .;                   \
-       . = ALIGN(8);                                                   \
-       VMLINUX_SYMBOL(__start___verbose) = .;                          \
-       *(__verbose)                                                    \
-       VMLINUX_SYMBOL(__stop___verbose) = .;
+       MEM_DISCARD(init.rodata)
 
 #define INIT_TEXT                                                      \
        *(.init.text)                                                   \
  * section in the linker script will go there too.  @phdr should have
  * a leading colon.
  *
- * This macro defines three symbols, __per_cpu_load, __per_cpu_start
- * and __per_cpu_end.  The first one is the vaddr of loaded percpu
- * init data.  __per_cpu_start equals @vaddr and __per_cpu_end is the
- * end offset.
+ * Note that this macros defines __per_cpu_load as an absolute symbol.
+ * If there is no need to put the percpu section at a predetermined
+ * address, use PERCPU().
  */
 #define PERCPU_VADDR(vaddr, phdr)                                      \
        VMLINUX_SYMBOL(__per_cpu_load) = .;                             \
  * Align to @align and outputs output section for percpu area.  This
  * macro doesn't maniuplate @vaddr or @phdr and __per_cpu_load and
  * __per_cpu_start will be identical.
+ *
+ * This macro is equivalent to ALIGN(align); PERCPU_VADDR( , ) except
+ * that __per_cpu_load is defined as a relative symbol against
+ * .data.percpu which is required for relocatable x86_32
+ * configuration.
  */
 #define PERCPU(align)                                                  \
        . = ALIGN(align);                                               \
-       PERCPU_VADDR( , )
+       .data.percpu    : AT(ADDR(.data.percpu) - LOAD_OFFSET) {        \
+               VMLINUX_SYMBOL(__per_cpu_load) = .;                     \
+               VMLINUX_SYMBOL(__per_cpu_start) = .;                    \
+               *(.data.percpu.first)                                   \
+               *(.data.percpu.page_aligned)                            \
+               *(.data.percpu)                                         \
+               *(.data.percpu.shared_aligned)                          \
+               VMLINUX_SYMBOL(__per_cpu_end) = .;                      \
+       }