diff options
author | David A. Long <dave.long@linaro.org> | 2014-02-14 22:41:18 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-02-18 19:42:00 +0000 |
commit | c9698e5cd6ad1ff2844bc44fabddc0f2e0562047 (patch) | |
tree | c290330a942c40711ceb143b48879d2a456fc904 /scripts/mod | |
parent | cd91b2fecfa66967e6ad732a9af860eb96c31ba4 (diff) | |
download | linux-exynos-c9698e5cd6ad1ff2844bc44fabddc0f2e0562047.tar.gz linux-exynos-c9698e5cd6ad1ff2844bc44fabddc0f2e0562047.tar.bz2 linux-exynos-c9698e5cd6ad1ff2844bc44fabddc0f2e0562047.zip |
ARM: 7964/1: Detect section mismatches in thumb relocations
Add processing for normally encountered thumb relocation types so that
section mismatches will be detected.
Comment from Rusty Russell follows:
Happiest for this to go through an ARM tree, so:
Signed-off-by: David A. Long <dave.long@linaro.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/modpost.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 40610984a1b5..99a45fdc1bbf 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1502,6 +1502,16 @@ static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) #define R_ARM_JUMP24 29 #endif +#ifndef R_ARM_THM_CALL +#define R_ARM_THM_CALL 10 +#endif +#ifndef R_ARM_THM_JUMP24 +#define R_ARM_THM_JUMP24 30 +#endif +#ifndef R_ARM_THM_JUMP19 +#define R_ARM_THM_JUMP19 51 +#endif + static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) { unsigned int r_typ = ELF_R_TYPE(r->r_info); @@ -1515,6 +1525,9 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) case R_ARM_PC24: case R_ARM_CALL: case R_ARM_JUMP24: + case R_ARM_THM_CALL: + case R_ARM_THM_JUMP24: + case R_ARM_THM_JUMP19: /* From ARM ABI: ((S + A) | T) - P */ r->r_addend = (int)(long)(elf->hdr + sechdr->sh_offset + |