US 11,709,670 B2
Identifying and configuring compatible versions of runtime components by shared libraries
Srinivasan Subramanian, Palo Alto, CA (US); Pruthvi K. Madugundu, Santa Clara, CA (US); Freddy Paul, Mountain House, CA (US); Jagadish Krishnamoorthy, Santa Clara, CA (US); Diwakar Das, Dublin, CA (US); and Praveen K. Jain, Santa Clara, CA (US)
Assigned to Advanced Micro Devices, Inc., Santa Clara, CA (US)
Filed by Advanced Micro Devices, Inc., Santa Clara, CA (US)
Filed on Apr. 14, 2020, as Appl. No. 16/848,681.
Prior Publication US 2021/0318862 A1, Oct. 14, 2021
Int. Cl. G06F 9/50 (2006.01); G06F 9/54 (2006.01); G06F 9/445 (2018.01); G06F 9/455 (2018.01); G06F 8/71 (2018.01); G06F 16/14 (2019.01); G06F 16/176 (2019.01)
CPC G06F 8/71 (2013.01) [G06F 9/445 (2013.01); G06F 16/148 (2019.01); G06F 16/176 (2019.01)] 22 Claims
OG exemplary drawing
 
1. An electronic device that executes an application that has a dependency on a shared library, the shared library having a dependency on a runtime component, the electronic device comprising:
a storage device with a file system that includes a plurality of directories; and
a processor configured to execute the application, the executing including:
loading the shared library, the loading including:
executing a constructor for the shared library, the constructor causing the processor to identify a selected directory where a compatible version of the runtime component is to be found based on a location of the shared library in the file system, wherein the location of the shared library is determined from an application context from the application, and wherein the identifying includes:
determining a path of the shared library in the file system from the application context of the application;
identifying candidate directories in the file system where a compatible version of the runtime component may be located based at least in part on the path;
finding, using the candidate directories, the selected directory where the compatible version of the runtime component is located; and
configuring a record in an internal state of the shared library to identify the selected directory as being where the compatible version of the runtime component is located; and
when subsequently loading the compatible version of the runtime component for execution, locate the compatible version of the runtime component in the selected directory.