Fix usage of custom graphics provider
-
graphics: Factor out _srt_get_modules_from_loader_library function
-
graphics: Respect provider sysroot when calling capsule-capture-libs
-
runtime: Use correct ld.so from provider
When we need to take the ld.so from the provider, we expect to have a path relative to the provider.
-
runtime: Provide a path in provider namespace for capsule-capture-libs
-
graphics: Factor out _initial_capsule_capture_libs_argv function
-
graphics: Use capsule-capture-libs when the sysroot is not "/"
Previously we were using _srt_check_library_presence() to locate the loader libraries.
However if we are trying to use a graphical stack that is not from the host system, it's not guaranteed that we can dlopen() the libraries because they may have unmet dependencies.
For this reason when we have a sysroot that is not "/", we revert back to capsule-capture-libs to search for the correct library, under the expected sysroot.
This is still a WIP, but an high level review regarding the direction I'm taking is already doable.