Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98085b17 authored by Kees Cook's avatar Kees Cook Committed by Sami Tolvanen
Browse files

ANDROID: x86, relocs: Ignore __typeid__ relocations



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

Bug: 145297900
Change-Id: I41d0e093b3cdc3665be1722551011da5ec3eb940
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent 93db8a47
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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: