Merge branch '4.3-fixes' into mips-for-linux-next
[cascardo/linux.git] / arch / mips / kernel / vmlinux.lds.S
index f4c23d9..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 */
@@ -186,6 +193,7 @@ SECTIONS
        DISCARDS
        /DISCARD/ : {
                /* ABI crap starts here */
+               *(.MIPS.abiflags)
                *(.MIPS.options)
                *(.options)
                *(.pdr)