diff options
author | Andrey Ryabinin <a.ryabinin@samsung.com> | 2014-08-08 14:12:17 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-08-27 15:40:11 +0100 |
commit | 55f0fb6adb83a5883589e945cbce37e90615ea09 (patch) | |
tree | 8cba5137c2b419c4902a2bc84526e5ddbcc9db4a /arch/arm/kernel/module.c | |
parent | 52addcf9d6669fa439387610bc65c92fa0980cef (diff) | |
download | talos-op-linux-55f0fb6adb83a5883589e945cbce37e90615ea09.tar.gz talos-op-linux-55f0fb6adb83a5883589e945cbce37e90615ea09.zip |
ARM: 8127/1: module: add support for R_ARM_TARGET1 relocations
Kernel module build with GCOV profiling fails to load with the
following error:
$ insmod test_module.ko
test_module: unknown relocation: 38
insmod: can't insert 'test_module.ko': invalid module format
This happens because constructor pointers in the .init_array section
have not supported R_ARM_TARGET1 relocation type.
Documentation (ELF for the ARM Architecture) says:
"The relocation must be processed either in the same way as R_ARM_REL32 or
as R_ARM_ABS32: a virtual platform must specify which method is used."
Since kernel expects to see absolute addresses in .init_array R_ARM_TARGET1
relocation type should be treated the same way as R_ARM_ABS32.
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/module.c')
-rw-r--r-- | arch/arm/kernel/module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 45e478157278..6a4dffefd357 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -91,6 +91,7 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, break; case R_ARM_ABS32: + case R_ARM_TARGET1: *(u32 *)loc += sym->st_value; break; |