US 11,720,374 B1
Dynamically overriding a function based on a capability set
Pranav Kant, Kirkland, WA (US); Joseph Norman Bialek, Seattle, WA (US); Xiang Fan, Bellevue, WA (US); YongKang Zhu, Redmond, WA (US); Gabriel Thomas Kodjo Dos Reis, Issaquah, WA (US); Russell Bivens Keldorph, Seattle, WA (US); Mehmet Iyigun, Kirkland, WA (US); Russell Charles Hadley, Bellevue, WA (US); Roy Williams, Woodinville, WA (US); Kenneth Dean Johnson, Bellevue, WA (US); Pedro Miguel Sequeira De Justo Teixeira, Kirkland, WA (US); and Yevgeniy Bak, Redmond, WA (US)
Assigned to Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed by Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed on Apr. 19, 2022, as Appl. No. 17/724,329.
Claims priority of provisional application 63/309,112, filed on Feb. 11, 2022.
Int. Cl. G06F 9/44 (2018.01); G06F 9/448 (2018.01)
CPC G06F 9/4486 (2018.02) 18 Claims
OG exemplary drawing
 
1. A method, implemented at a computer system that includes a processor, for dynamically overriding a function based on a capability set, the method comprising:
reading a portion of an executable image file, the portion including a first memory address corresponding to a first callee function implementation, the first memory address having been inserted into the portion by a compiler toolchain, wherein the first callee function implementation is a capability-agnostic implementation of a callee function;
based on extensible metadata included in the executable image file, and based on a capability set that is specific to the computer system, determining a second memory address corresponding to a second callee function implementation, wherein the second callee function implementation is a capability-specific implementation of the callee function that utilizes at least one capability in the capability set; and
before execution of the portion, modifying the portion to replace the first memory address with the second memory address.