Binary-code compatibility
在某些情况下,我们期望"binary-code compatibility",因为它有着非常好的特性,本节介绍它 ,并且介绍如何来实现它。
wikipedia Binary-code compatibility
Binary-code compatibility (binary compatible or object-code-compatible) is a property of computer systems meaning that they can run the same executable code, typically machine code for a general-purpose computer CPU. Source-code compatibility, on the other hand, means that recompilation or interpretation is necessary before the program can be run.
NOTE:
1、通过阅读上面这段话,我的认知是: Binary-code compatibility 意味着 不需要 recompilation or interpretation
For a compiled program on a general operating system, binary compatibility often implies that not only the CPUs (instruction sets) of the two computers are binary compatible, but also that interfaces and behaviours of the operating system and APIs, and the ABIs corresponding to those APIs, are sufficiently equal, i.e. "compatible".
NOTE:
1、通过阅读上面这段话,我的认知是: Binary-code compatibility 意味着:
a、the CPUs (instruction sets) of the two computers are binary compatible
b、interfaces and behaviours of the operating system are sufficiently equal, i.e. "compatible"
c、 APIs, and the ABIs are sufficiently equal, i.e. "compatible"
显然, Binary-code compatibility 有着非常严苛的要求。
Implementation
如何来实现binary-code compatibility呢?在下面的文章中探讨了这个问题:
1、Opaque pointer,收录在 C++\Idiom\OOP\Pointer-to-implementation-PImpl\Opaque-data-type\Opaque-pointer
章节