summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/Kconfig7
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--scripts/module.lds.S2
3 files changed, 10 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 334b69505381..4eb2e51e28f1 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1127,6 +1127,13 @@ config ARCH_WANTS_MODULES_DATA_IN_VMALLOC
For architectures like powerpc/32 which have constraints on module
allocation and need to allocate module data outside of module area.
+config ARCH_WANTS_MODULES_TEXT_SECTIONS
+ bool
+ help
+ For architectures like 32-bit parisc which require that functions in
+ modules have to keep code in own text sections (-ffunction-sections)
+ and to avoid merging all text into one big text section,
+
config ARCH_WANTS_EXECMEM_LATE
bool
help
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 3e929eb5a7fe..d3afac2f0d9b 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -8,6 +8,7 @@ config PARISC
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_SYSCALL_TRACEPOINTS
select ARCH_WANT_FRAME_POINTERS
+ select ARCH_WANTS_MODULES_TEXT_SECTIONS if !64BIT
select ARCH_HAS_CPU_CACHE_ALIASING
select ARCH_HAS_DMA_ALLOC if PA11
select ARCH_HAS_DMA_OPS
diff --git a/scripts/module.lds.S b/scripts/module.lds.S
index 2dc4c8c3e667..b62683061d79 100644
--- a/scripts/module.lds.S
+++ b/scripts/module.lds.S
@@ -40,9 +40,11 @@ SECTIONS {
__kcfi_traps 0 : { KEEP(*(.kcfi_traps)) }
#endif
+#ifndef CONFIG_ARCH_WANTS_MODULES_TEXT_SECTIONS
.text 0 : {
*(.text .text.[0-9a-zA-Z_]*)
}
+#endif
.bss 0 : {
*(.bss .bss.[0-9a-zA-Z_]*)