ANDROID: x86, relocs: Ignore __typeid__ relocations

The __typeid__* symbols aren't actually relocations, so they can be
ignored during relocation generation.

Bug: 145210207
Change-Id: Ib9abe21c3c2aeee2a41491f8358f1a88717fa843
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
Kees Cook
2019-11-06 14:47:30 -08:00
committed by Alistair Delva
parent 5cbcf1f988
commit da6465aa09

View File

@@ -48,6 +48,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
"^(xen_irq_disable_direct_reloc$|"
"xen_save_fl_direct_reloc$|"
"VDSO|"
"__typeid__|"
"__crc_)",
/*
@@ -808,6 +809,12 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
symname);
break;
case R_X86_64_8:
if (!shn_abs || !is_reloc(S_ABS, symname))
die("Non-whitelisted %s relocation: %s\n",
rel_type(r_type), symname);
break;
case R_X86_64_32:
case R_X86_64_32S:
case R_X86_64_64: