MIPS: Octeon: Add config option to disable ELF NOTE segments
PATCH 1/1 MIPS: Octeon: Add config option to disable ELF NOTE segments
From: David Daney <[email protected]>
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 <[email protected]>
---
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(-)
arch/mips/kernel/vmlinux.lds.S +8 -2
@@ -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 */
Signature · 1 line
1.7.11.7