Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / asm-generic / vmlinux.lds.h
index 48c5299cbf26e796e3188f397faa96cd3889a112..8a92a170fb7dfd87710bb26b3c7f384dd6801363 100644 (file)
 /* Align . to a 8 byte boundary equals to maximum function alignment. */
 #define ALIGN_FUNCTION()  . = ALIGN(8)
 
+/*
+ * Align to a 32 byte boundary equal to the
+ * alignment gcc 4.5 uses for a struct
+ */
+#define STRUCT_ALIGN() . = ALIGN(32)
+
 /* The actual configuration determine if the init/exit sections
  * are handled as text/data or they can be discarded (which
  * often happens at runtime)
        CPU_KEEP(exit.data)                                             \
        MEM_KEEP(init.data)                                             \
        MEM_KEEP(exit.data)                                             \
-       . = ALIGN(8);                                                   \
-       VMLINUX_SYMBOL(__start___markers) = .;                          \
-       *(__markers)                                                    \
-       VMLINUX_SYMBOL(__stop___markers) = .;                           \
        . = ALIGN(32);                                                  \
        VMLINUX_SYMBOL(__start___tracepoints) = .;                      \
        *(__tracepoints)                                                \
        LIKELY_PROFILE()                                                \
        BRANCH_PROFILE()                                                \
        TRACE_PRINTKS()                                                 \
+                                                                       \
+       STRUCT_ALIGN();                                                 \
        FTRACE_EVENTS()                                                 \
+                                                                       \
+       STRUCT_ALIGN();                                                 \
        TRACE_SYSCALLS()
 
 /*
  */
 #define INIT_TASK_DATA_SECTION(align)                                  \
        . = ALIGN(align);                                               \
-       .data..init_task : {                                            \
+       .data..init_task :  AT(ADDR(.data..init_task) - LOAD_OFFSET) {  \
                INIT_TASK_DATA(align)                                   \
        }
 
        EXIT_DATA                                                       \
        EXIT_CALL                                                       \
        *(.discard)                                                     \
+       *(.discard.*)                                                   \
        }
 
 /**