These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / mips / kernel / vmlinux.lds.S
index 3b46f7c..0a93e83 100644 (file)
@@ -17,7 +17,9 @@ OUTPUT_ARCH(mips)
 ENTRY(kernel_entry)
 PHDRS {
        text PT_LOAD FLAGS(7);  /* RWX */
+#ifndef CONFIG_CAVIUM_OCTEON_SOC
        note PT_NOTE FLAGS(4);  /* R__ */
+#endif /* CAVIUM_OCTEON_SOC */
 }
 
 #ifdef CONFIG_32BIT
@@ -71,7 +73,12 @@ SECTIONS
                __stop___dbe_table = .;
        }
 
-       NOTES :text :note
+#ifdef CONFIG_CAVIUM_OCTEON_SOC
+#define NOTES_HEADER
+#else /* CONFIG_CAVIUM_OCTEON_SOC */
+#define NOTES_HEADER :note
+#endif /* CONFIG_CAVIUM_OCTEON_SOC */
+       NOTES :text NOTES_HEADER
        .dummy : { *(.dummy) } :text
 
        _sdata = .;                     /* Start of data section */
@@ -125,8 +132,19 @@ SECTIONS
        .exit.data : {
                EXIT_DATA
        }
-
+#ifdef CONFIG_SMP
        PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
+#endif
+#ifdef CONFIG_MIPS_RAW_APPENDED_DTB
+       __appended_dtb = .;
+       /* leave space for appended DTB */
+       . += 0x100000;
+#elif defined(CONFIG_MIPS_ELF_APPENDED_DTB)
+       .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) {
+               *(.appended_dtb)
+               KEEP(*(.appended_dtb))
+       }
+#endif
        /*
         * Align to 64K in attempt to eliminate holes before the
         * .bss..swapper_pg_dir section at the start of .bss.  This
@@ -175,6 +193,7 @@ SECTIONS
        DISCARDS
        /DISCARD/ : {
                /* ABI crap starts here */
+               *(.MIPS.abiflags)
                *(.MIPS.options)
                *(.options)
                *(.pdr)