include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / arch / mips / kernel / vmlinux.lds.S
index 03ad46e..f25df73 100644 (file)
@@ -1,11 +1,25 @@
 #include <asm/asm-offsets.h>
+#include <asm/page.h>
 #include <asm-generic/vmlinux.lds.h>
 
 #undef mips
 #define mips mips
 OUTPUT_ARCH(mips)
 ENTRY(kernel_entry)
-jiffies = JIFFIES;
+PHDRS {
+       text PT_LOAD FLAGS(7);  /* RWX */
+       note PT_NOTE FLAGS(4);  /* R__ */
+}
+
+#ifdef CONFIG_32BIT
+       #ifdef CONFIG_CPU_LITTLE_ENDIAN
+               jiffies  = jiffies_64;
+       #else
+               jiffies  = jiffies_64 + 4;
+       #endif
+#else
+       jiffies  = jiffies_64;
+#endif
 
 SECTIONS
 {
@@ -24,25 +38,22 @@ SECTIONS
        /* . = 0xa800000000300000; */
        . = 0xffffffff80300000;
 #endif
-       . = LOADADDR;
+       . = VMLINUX_LOAD_ADDRESS;
        /* read-only */
        _text = .;      /* Text and read-only data */
        .text : {
                TEXT_TEXT
                SCHED_TEXT
                LOCK_TEXT
+               KPROBES_TEXT
+               IRQENTRY_TEXT
+               *(.text.*)
                *(.fixup)
                *(.gnu.warning)
-       } =0
+       } :text = 0
        _etext = .;     /* End of text section */
 
-       /* Exception table */
-       . = ALIGN(16);
-       __ex_table : {
-               __start___ex_table = .;
-               *(__ex_table)
-               __stop___ex_table = .;
-       }
+       EXCEPTION_TABLE(16)
 
        /* Exception table for data bus errors */
        __dbe_table : {
@@ -50,25 +61,21 @@ SECTIONS
                *(__dbe_table)
                __stop___dbe_table = .;
        }
+
+       NOTES :text :note
+       .dummy : { *(.dummy) } :text
+
        RODATA
 
        /* writeable */
        .data : {       /* Data */
-         . = . + DATAOFFSET;           /* for CONFIG_MAPPED_KERNEL */
-         /*
-          * This ALIGN is needed as a workaround for a bug a gcc bug upto 4.1 which
-          * limits the maximum alignment to at most 32kB and results in the following
-          * warning:
-          *
-          *  CC      arch/mips/kernel/init_task.o
-          * arch/mips/kernel/init_task.c:30: warning: alignment of ‘init_thread_union’
-          * is greater than maximum object file alignment.  Using 32768
-          */
-         . = ALIGN(_PAGE_SIZE);
-         *(.data.init_task)
-
-         DATA_DATA
-         CONSTRUCTORS
+               . = . + DATAOFFSET;             /* for CONFIG_MAPPED_KERNEL */
+
+               INIT_TASK_DATA(PAGE_SIZE)
+               NOSAVE_DATA
+               CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
+               DATA_DATA
+               CONSTRUCTORS
        }
        _gp = . + 0x8000;
        .lit8 : {
@@ -83,98 +90,33 @@ SECTIONS
        .sdata : {
                *(.sdata)
        }
-
-       . = ALIGN(_PAGE_SIZE);
-       .data_nosave : {
-               __nosave_begin = .;
-               *(.data.nosave)
-       }
-       . = ALIGN(_PAGE_SIZE);
-       __nosave_end = .;
-
-       . = ALIGN(32);
-       .data.cacheline_aligned : {
-               *(.data.cacheline_aligned)
-       }
        _edata =  .;                    /* End of data section */
 
        /* will be freed after init */
-       . = ALIGN(_PAGE_SIZE);          /* Init code and data */
+       . = ALIGN(PAGE_SIZE);           /* Init code and data */
        __init_begin = .;
-       .init.text : {
-               _sinittext = .;
-               *(.init.text)
-               _einittext = .;
-       }
-       .init.data : {
-               *(.init.data)
-       }
-       . = ALIGN(16);
-       .init.setup : {
-               __setup_start = .;
-               *(.init.setup)
-               __setup_end = .;
-       }
-
-       .initcall.init : {
-               __initcall_start = .;
-               INITCALLS
-               __initcall_end = .;
-       }
-
-       .con_initcall.init : {
-               __con_initcall_start = .;
-               *(.con_initcall.init)
-               __con_initcall_end = .;
-       }
-       SECURITY_INIT
+       INIT_TEXT_SECTION(PAGE_SIZE)
+       INIT_DATA_SECTION(16)
 
        /* .exit.text is discarded at runtime, not link time, to deal with
         * references from .rodata
         */
        .exit.text : {
-               *(.exit.text)
+               EXIT_TEXT
        }
        .exit.data : {
-               *(.exit.data)
-       }
-#if defined(CONFIG_BLK_DEV_INITRD)
-       . = ALIGN(_PAGE_SIZE);
-       .init.ramfs : {
-               __initramfs_start = .;
-               *(.init.ramfs)
-               __initramfs_end = .;
+               EXIT_DATA
        }
-#endif
-       PERCPU(_PAGE_SIZE)
-       . = ALIGN(_PAGE_SIZE);
+
+       PERCPU(PAGE_SIZE)
+       . = ALIGN(PAGE_SIZE);
        __init_end = .;
        /* freed after init ends here */
 
-       __bss_start = .;        /* BSS */
-       .sbss  : {
-               *(.sbss)
-               *(.scommon)
-       }
-       .bss : {
-               *(.bss)
-               *(COMMON)
-       }
-       __bss_stop = .;
+       BSS_SECTION(0, 0, 0)
 
        _end = . ;
 
-       /* Sections to be discarded */
-       /DISCARD/ : {
-               *(.exitcall.exit)
-
-               /* ABI crap starts here */
-               *(.MIPS.options)
-               *(.options)
-               *(.pdr)
-               *(.reginfo)
-       }
-
        /* These mark the ABI of the kernel for debuggers.  */
        .mdebug.abi32 : {
                KEEP(*(.mdebug.abi32))
@@ -200,7 +142,14 @@ SECTIONS
                *(.gptab.bss)
                *(.gptab.sbss)
        }
-       .note : {
-               *(.note)
+
+       /* Sections to be discarded */
+       DISCARDS
+       /DISCARD/ : {
+               /* ABI crap starts here */
+               *(.MIPS.options)
+               *(.options)
+               *(.pdr)
+               *(.reginfo)
        }
 }