From cdf744be2b7d3e302381d2476eaf16a1f9546e5a Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Wed, 15 Jan 2020 15:29:21 -0800 Subject: [PATCH] ANDROID: x86, module: Ignore __typeid__ relocations Also ignore these relocations when loading modules. Bug: 145210207 Change-Id: I53c8ed4811fee4b770fc5824376fef657ab47bdf Signed-off-by: Sami Tolvanen --- arch/x86/kernel/module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 34b153cbd4ac..506928b06af5 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c @@ -196,6 +196,10 @@ static int __apply_relocate_add(Elf64_Shdr *sechdrs, val -= (u64)loc; write(loc, &val, 8); break; + case R_X86_64_8: + if (!strncmp(strtab + sym->st_name, "__typeid__", 10)) + break; + /* fallthrough */ default: pr_err("%s: Unknown rela relocation: %llu\n", me->name, ELF64_R_TYPE(rel[i].r_info));