Usually modules are loaded into small area prior to the kernel text because they are linked with the kernel using short calls. Compile-time instrumentation like GCOV or KASAN bloats code a lot, and as a result huge modules no longer fit into reserved area. This patch adds option CONFIG_MODULES_USE_VMALLOC which lifts limitation on amount of loaded modules. It links modules using long-calls (option -mlong-calls) and loads them into vmalloc area. In few places exported symbols are called from inline assembly. This patch adds macro for such call sites: __asmbl and __asmbl_clobber. Call turns into single 'bl' or sequence 'movw; movt; blx' depending on context and state of config option. Unfortunately this option isn't compatible with CONFIG_FUNCTION_TRACER. Compiler emits short calls to profiling function despite of -mlong-calls. This is a bug in GCC, but ftrace anyway needs an update to handle this. Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com> Patch-mainline: linux-arm-kernel @ 18/11/2014, 20:21:46 Change-Id: Iea7990a033c060c26f5782125fb63d6f96a9d218 Signed-off-by: Shubham Aggarwal <shubagga@codeaurora.org>tirimbino
parent
df1b567cdc
commit
fe1372ae09
Loading…
Reference in new issue