-
- Downloads
librarystore: propagate users across PLT calls
So far, we only propagated users through direct calls or calls to other exported functions in the same library via the PLT. The code in interface_calls.py also checked for PLT calls to imported functions but only printed a debug message. This change also extracts these calls on a per-function basis and creates a mapping of functions to their calls to imported functions. This mapping can be used to generate a more fine-grained dependency analysis when propagating users of exports through the dependency tree. For example, we could only add a user to an export if the callee itself has users (instead of always adding it while resolving the location of imported symbols). As this requires a bit more thought and work, this will be done in a later change. For now, we propagate the users in addition to marking them as used in LibraryStore.resolve_functions(). Propagation now needs a worklist algorithm, as a propagation across libraries makes it necessary to re-evaluate a library even if that library has been processed before.
Showing
- librarytrader/interface_calls.py 21 additions, 19 deletionslibrarytrader/interface_calls.py
- librarytrader/library.py 11 additions, 5 deletionslibrarytrader/library.py
- librarytrader/librarystore.py 49 additions, 28 deletionslibrarytrader/librarystore.py
- test/test_library.py 17 additions, 7 deletionstest/test_library.py
Please register or sign in to comment