Jacek Caban (@jacek) commented about dlls/ntdll/loader.c:
if (TRACE_ON(snoop)) {
const WCHAR *user = importer ? importer->ldr.BaseDllName.Buffer : NULL;
} if (TRACE_ON(relay)) {const WCHAR *user = !is_dynamic && importer ? importer->ldr.BaseDllName.Buffer : NULL; proc = SNOOP_GetProcAddress( module, exports, exp_size, proc, ordinal, user );
const WCHAR *user = importer ? importer->ldr.BaseDllName.Buffer : NULL;
const WCHAR *user = !is_dynamic && importer ? importer->ldr.BaseDllName.Buffer : NULL;
I still hope we can simplify this. After giving it more thought, since relay behavior is ours to define, I don’t see an issue with adjusting it for dynamic resolution. Arguably, it makes sense to honor the importer in the is_dynamic case.
I’d suggest dropping this change and simply accepting that the relay behavior changes in a later commit.