[PATCH] MIPS: Octeon: Add config option to disable ELF NOTE segments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Daney <ddaney@xxxxxxxxxxxxxxxxxx>

Pre-SDK-1.8.1 bootloaders can not handel PT_NOTE program headers, so
we by default will not emit them.

Signed-off-by: David Daney <ddaney@xxxxxxxxxxxxxxxxxx>
---

This patch is not against the current HEAD, so if someone like it it
would have to be forward ported, and tested.  Probably removing the
Kconfig option is a good idea too.

 arch/mips/kernel/vmlinux.lds.S | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 05826d2..457a785 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -17,7 +17,9 @@ OUTPUT_ARCH(mips)
 ENTRY(kernel_entry)
 PHDRS {
 	text PT_LOAD FLAGS(7);	/* RWX */
+#ifndef CONFIG_DISABLE_ELF_NOTE_HEADER
 	note PT_NOTE FLAGS(4);	/* R__ */
+#endif
 }
 
 #ifdef CONFIG_32BIT
@@ -70,8 +72,12 @@ SECTIONS
 		*(__dbe_table)
 		__stop___dbe_table = .;
 	}
-
-	NOTES :text :note
+#ifdef CONFIG_DISABLE_ELF_NOTE_HEADER
+#define NOTES_HEADER
+#else
+#define NOTES_HEADER :note
+#endif
+	NOTES :text NOTES_HEADER
 	.dummy : { *(.dummy) } :text
 
 	_sdata = .;			/* Start of data section */
-- 
1.7.11.7





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux