From 951a668bc45a0b5fa2ef00ffda699a603e8b85fe Mon Sep 17 00:00:00 2001 From: vit9696 Date: Sat, 6 Jul 2019 18:56:13 +0300 Subject: [PATCH] OcAppleKernelLib: Clarify Vtable TODO --- Library/OcAppleKernelLib/PrelinkedKext.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Library/OcAppleKernelLib/PrelinkedKext.c b/Library/OcAppleKernelLib/PrelinkedKext.c index 2fc8c379..30bd4ce7 100644 --- a/Library/OcAppleKernelLib/PrelinkedKext.c +++ b/Library/OcAppleKernelLib/PrelinkedKext.c @@ -814,10 +814,12 @@ InternalLinkPrelinkedKext ( Kext->StringTable = NULL; Kext->NumberOfSymbols = 0; // - // FIXME: VTable and entry names are not updated after relocating StringTable - // Decide whether to keep re-constructing VTables, recalculate - // addresses after linking has finished or store the name's offset and - // access via a StringTable pointer. + // TODO: VTable and entry names are not updated after relocating StringTable, + // which means that to avoid linkage issues for plugins we must either continue + // re-constructing VTables (as done below) or implement some optimisations. + // For example, we could recalculate addresses after linking has finished. + // We could also store the name's offset and access via a StringTable pointer, + // yet it was prone to errors and was already removed once. // if (Kext->LinkedVtables != NULL) { FreePool (Kext->LinkedVtables);