On Fri Feb 14 17:21:09 2025 +0000, Jacek Caban wrote:
Is this about modules loaded with `LDR_DONT_RESOLVE_REFS`? Should `find_forwarded_export` still resolve them in that case? With your series complete, we always have an importer, so unless I’m missing something, this seems to be the only scenario. I’m trying to understand the logic here: if `find_forwarded_export` should still load such dependencies, I can see the reasoning behind skipping `process_attach` in that case, but binding the dependency still seems possible.
I assume it's there to detect dependency cycles. If there is a dep cycle like `A --(import)--> B.proc2 --(forward)--> A.proc3` and we are processing the forward, then `A` would have `LDR_DONT_RESOLVE_REFS` set since module `A` hasn't completed `fixup_imports` (it's still resolving import of B.proc2). In that case adding a module dependency would result in a directed cycle `A --> B --> A`, which is unacceptable in a DAG.
The logic was there without comment before this patch, so I kept it as-is after this patch.