US 11,720,335 B2
Hybrid binaries supporting code stream folding
Pedro Miguel Sequeira De Justo Teixeira, Kirkland, WA (US); Darek Josip Mihocka, Mercer Island, WA (US); Jon Robert Berry, Woodinville, WA (US); Russell Charles Hadley, Bellevue, WA (US); James David Cleary, Seattle, WA (US); and Clarence Siu Yeen Dang, Newcastle, WA (US)
Assigned to Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed by Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed on Dec. 14, 2021, as Appl. No. 17/550,452.
Application 17/550,452 is a continuation of application No. 17/008,270, filed on Aug. 31, 2020, granted, now 11,231,918.
Prior Publication US 2022/0137942 A1, May 5, 2022
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 8/41 (2018.01)
CPC G06F 8/47 (2013.01) [G06F 8/447 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method, implemented at a computer system that includes a processor, for generating a hybrid binary image, the hybrid binary image being executable under both a native application binary interface (ABI) and a compatibility ABI, the method comprising:
based at least on identifying a first function that is non-foldable, emitting, into the hybrid binary image, both of (i) a first compiled version of the first function that is executable under the native ABI, and (ii) a second compiled version of the first function that is executable under the compatibility ABI;
based at least on identifying a second function that is foldable, emitting, into the hybrid binary image, a compiled version of the second function that is executable under both of the native ABI and the compatibility ABI, the compiled version of the second function being structured to call the first compiled version of the first function when the hybrid binary image is loaded by a native process executing under the native ABI; and
emitting, into the hybrid binary image, a fixup table that is structured to be utilized when the hybrid binary image is loaded by a compatibility process executing under the compatibility ABI, the fixup table defining one or more transformations to memory loaded from the hybrid binary image, the one or more transformations including a first transformation that configures the compiled version of the second function to call the second compiled version of the first function instead of the first compiled version of the first function.