Stack frame unwinding for exception handling
US-10705850-B2 · Jul 7, 2020 · US
US11042422B1 · US · B1
| Field | Value |
|---|---|
| Publication number | US-11042422-B1 |
| Application number | US-202017008346-A |
| Country | US |
| Kind code | B1 |
| Filing date | Aug 31, 2020 |
| Priority date | Aug 31, 2020 |
| Publication date | Jun 22, 2021 |
| Grant date | Jun 22, 2021 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A hybrid binary executable under both native processes and compatibility (e.g., emulated) processes. When the hybrid binary is loaded by a native process, the process executes a native code stream contained in the binary directly on a processor. When the hybrid binary is loaded by a compatibility process, the process executes an emulation-compatible (EC) code stream directly on a processor. When executing in a compatibility process, the EC code stream can interact with a foreign code stream that executes in an emulator. The foreign code stream can be included in the hybrid binary itself, or can be external to the hybrid binary. The hybrid binary format supports folding of code between the native code stream and the EC code stream. The hybrid binary comprises a set of memory transformations which are applied to image data obtained from the binary when the hybrid binary executes under the compatibility process.
Opening claim text (preview).
What is claimed: 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 machine type of the native ABI, emitting the first machine type into a machine type field of the hybrid binary image, the machine type field being structured to be utilized when the hybrid binary image is loaded by a native process executing under the native ABI; 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 the native process; 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 a plurality of transformations to memory data loaded from the hybrid binary image, the plurality of transformations including: a first transformation that adjusts the machine type field to comprise a second machine type of the compatibility ABI; and a second 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. 2. The method of claim 1 , further comprising: emitting, into the hybrid binary image, one or more tables that comprise (i) a first zone referencing at least the first function using the first compiled version of the first function, (ii) a second zone referencing at least the second function using the compiled version of the second function, and (iii) a third zone referencing at least the first function using the second compiled version of the first function; and emitting, into the hybrid binary image, a reference to the one or more tables that provides a native view of the one or more tables that includes the first zone and the second zone, while excluding the third zone, the reference being structured to be utilized when the hybrid binary image is loaded by the native process, wherein the plurality of transformations also include a third transformation that adjusts the reference to the one or more tables to provide a compatibility view of the one or more tables that includes the second zone and the third zone, while excluding the first zone. 3. The method of claim 2 , wherein, the one or more tables comprise one or more import tables, and the first, second, and third zones comprise first, second, and third function imports; or the one or more tables comprise one or more export tables, and the first, second, and third zones comprise first, second, and third function exports. 4. The method of claim 2 , wherein the reference to the one or more tables provides the native view of the one or more tables by specifying an offset and a size, and wherein the third transformation adjusts the reference to provide the compatibility view by modifying one or more of the offset or the size. 5. The method of claim 1 , further comprising emitting, into the hybrid binary image, an entry point referencing the first compiled version of the first function, the entry point being structured to be utilized when the hybrid binary image is loaded by the native process. 6. The method of claim 5 , wherein the plurality of transformations also include a third transformation that adjusts the entry point to reference the second compiled version of the first function. 7. The method of claim 1 , wherein the compiled version of the second function is structured to call the first compiled version of the first function via a dispatch table that references the first compiled version of the first function, and wherein the second transformation modifies the dispatch table to reference the second compiled version of the first function instead of the first compiled version of the first function. 8. The method of claim 7 , further comprising emitting the dispatch table into the hybrid binary image. 9. A computer system for generating a hybrid binary image, the hybrid binary image being executable under both a native application binary interface (ABI) and a compatibility ABI, comprising: a processor; and a hardware storage device that stores computer-executable instructions that are executable by the processor to cause the computer system to perform at least the following: based at least on identifying a first machine type of the native ABI, emit the first machine type into a machine type field of the hybrid binary image, the machine type field being structured to be utilized when the hybrid binary image is loaded by a native process executing under the native ABI; based at least on identifying a first function that is non-foldable, emit, 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, emit 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 the native process; and emit, 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 a plurality of transformations to memory data loaded from the hybrid binary image, the plurality of transformations including: a first transformation that adjusts the machine type field to comprise a second machine type of the compatibility ABI; and a second 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. 10. The computer system of claim 9 , the computer-executable instructions also executable by the processor to cause the computer system to: emit, into the hybrid binary image, one or more tables that comprise (i) a first zone referencing at least the first function using the first compiled version of the first function, (ii) a second zone referencing at least the second function using the compiled version of the second function, and (iii) a third zone referencing at least the first function using the second compiled version of the first function; and emit, into the hybrid binary image, a reference to the one or more tables that provides a native view of the one or more tables that includes the first zone and the second zone, while excluding the third zone, the reference being structured to be utilized when the hybrid binary image is loaded by the native process, wherein the plurality of transformations also include a third transformation that adjusts the reference to the one or more tables to provide a co
via adapters, e.g. between incompatible applications · CPC title
Fat binaries · CPC title
Version control (security arrangements therefor G06F21/57); Configuration management · CPC title
Target code generation · CPC title
Reducing the memory space required by the program code · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.