diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-24 07:32:59 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-24 07:32:59 -0400 |
commit | adca6dc23bc620ea95392659625200a252b97be3 (patch) | |
tree | baf8826c30b10e85a77a76a11f7e744182afeed4 /arch/arm/include/asm/memory.h | |
parent | 0e056f20f18d0efa5da920f3cf8532adc56d5779 (diff) |
Thumb-2: Add support for loadable modules
Modules compiled to Thumb-2 have two additional relocations needing to
be resolved at load time, R_ARM_THM_CALL and R_ARM_THM_JUMP24, for BL
and B.W instructions. The maximum Thumb-2 addressing range is +/-2^24
(+/-16MB) therefore the MODULES_VADDR macro in asm/memory.h is set to
(MODULES_END - 8MB) for the Thumb-2 compiled kernel.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/include/asm/memory.h')
-rw-r--r-- | arch/arm/include/asm/memory.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 85763db87449..376be1a62866 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -44,7 +44,13 @@ | |||
44 | * The module space lives between the addresses given by TASK_SIZE | 44 | * The module space lives between the addresses given by TASK_SIZE |
45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | 45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. |
46 | */ | 46 | */ |
47 | #ifndef CONFIG_THUMB2_KERNEL | ||
47 | #define MODULES_VADDR (PAGE_OFFSET - 16*1024*1024) | 48 | #define MODULES_VADDR (PAGE_OFFSET - 16*1024*1024) |
49 | #else | ||
50 | /* smaller range for Thumb-2 symbols relocation (2^24)*/ | ||
51 | #define MODULES_VADDR (PAGE_OFFSET - 8*1024*1024) | ||
52 | #endif | ||
53 | |||
48 | #if TASK_SIZE > MODULES_VADDR | 54 | #if TASK_SIZE > MODULES_VADDR |
49 | #error Top of user space clashes with start of module space | 55 | #error Top of user space clashes with start of module space |
50 | #endif | 56 | #endif |