Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Binary-code compatibility

From Wikipedia, the free encyclopedia
(Redirected fromBinary compatibility)
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Binary-code compatibility" – news ·newspapers ·books ·scholar ·JSTOR
(November 2013) (Learn how and when to remove this message)
Ability of a computer system to run the same code as another computer system

Binary-code compatibility (binary compatible orobject-code compatible) is a property of acomputer system, meaning that it can run the sameexecutable code, typicallymachine code for ageneral-purpose computercentral processing unit (CPU), that another computer system can run.Source-code compatibility, on the other hand, means thatrecompilation orinterpretation is necessary before the program can be run on the compatible system.

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 theoperating system (OS) andapplication programming interfaces (APIs), and theapplication binary interfaces (ABIs) corresponding to those APIs, are sufficiently equal, i.e. "compatible".

A term likebackward-compatible usually implies object-code compatibility. This means that newer computer hardware and/or software has (practically) every feature of the old, plus additional capabilities or performance. Older executable code will thus run unchanged on the newer product. For a compiled program running directly on a CPU under an OS, a "binary compatible operating system" primarily meansapplication binary interface (ABI) compatibility with another system. However, it also often implies that APIs that the application depends on, directly or indirectly (such as theWindows API, for example), are sufficiently similar. Hardware (besides the CPU, such as for graphics) and peripherals that an application accesses may also be a factor for full compatibility, although many hardware differences are hidden by modern APIs (often partly supplied by the OS itself and partly by specificdevice drivers).

In other cases, a generalporting of the software must be used to make non-binary-compatible programs work.

Binary compatibility is a major benefit when developing computer programs that are to be run on multiple OSes. SeveralUnix-based OSes, such asFreeBSD orNetBSD, offer binary compatibility with more popular OSes, such asLinux-derived ones, since most binary executables are not commonly distributed for such OSes.

Most OSes provide binary compatibility, in each version of the OS, for most binaries built to run on earlier versions of the OS. For example, many executables compiled forWindows 3.1,Windows 95 orWindows 2000 can also be run onWindows XP orWindows 7, and many applications forDOS ran on much newer versions of Windows up to Windows 10 for as long as theNTVDM was supported.

Binary compatible hardware

[edit]

For a digital processor implemented in hardware, binary compatibility means that (a large subset of)machine code produced for another processor can be correctly executed and has (much) the same effect as on the other processor. This is quite common among many processor families, although it is rather uncommon among the ubiquitous smallembedded systems built around such processors. Full machine code compatibility would here imply exactly the same layout ofinterrupt service routines, I/O-ports,hardware registers, counter/timers, external interfaces and so on. For a more complex embedded system using moreabstraction layers (sometimes on the border to a general computer, such as a mobile phone), this may be different.

Binary compatible operating systems

[edit]

Binary compatible operating systems are OSes that aim to implement binary compatibility with another OS, or another variant of the same brand. This means that they are ABI-compatible (forapplication binary interface). As the job of an OS is to run programs, theinstruction set architectures running the OSes have to be the same or compatible. Otherwise, programs can be employed within aCPU emulator or a fasterdynamic translation mechanism to make them compatible.

For example, theLinux kernel is not compatible with Windows. This does not mean that Linux cannot be binary compatible with Windows applications. Additional software,Wine, is available that does that to some degree. TheReactOS development effort seeks to create anopen-source,free software OS that is binary compatible withMicrosoft'sWindows NT family of OSes using Wine for application compatibility and reimplementing the Windows kernel for additional compatibility such as for drivers whereas Linux would use Linux drivers, not Windows drivers.FreeBSD and other members of theBSD family have binary compatibility with theLinux kernel inusermode by translating Linux system calls into BSD ones. This enables the application and libraries code that run onLinux-based OSes to be run on BSD as well.

Note that a binary compatible OS is different from running an alternative OS throughvirtualization oremulation, which is done to run software within the alternative OS in the case when the host OS is not compatible. Sometimes virtualization is provided with the host OS (or such software can be obtained), which effectively makes the host OS compatible with programs. For example,Windows XP Mode forWindows 7 allows users to run a64-bit version of Windows 7 and enable old software to still work in a32-bit virtual machine runningWindows XP;VMware Workstation/VMware Fusion,Parallels Workstation, andWindows Virtual PC allow other OSes to be run on Windows, Linux, and macOS.

For another example,Mac OS X on thePowerPC had the ability to runMac OS 9 and earlier application software throughClassic—but this did not make Mac OS X a binary compatible OS with Mac OS 9. Instead, the Classic environment was actually running Mac OS 9.1 in avirtual machine, running as a normal process inside of Mac OS X.[1][2]

See also

[edit]

References

[edit]
  1. ^"Mac OS X System Architecture". 2002. Archived fromthe original on August 2, 2002.
  2. ^Singh, Amit (June 29, 2006).Mac OS X Internals: A Systems Approach.Addison-Wesley. Section 2.11.8: Classic.ISBN 0-321-27854-2.Classic Startup is a Mach-O application that runs Mac OS 9 within its address space. It provides a hardware abstraction layer between Mac OS 9 and Mac OS X by virtualizing traps, system calls, and interrupts. It runs in a protected memory environment, with multiple Mac OS 9 processes within it layered on top of a single Mac OS X BSD process.

External links

[edit]
  • KDE Techbase Policies – a compendium of C++ development rules of thumb (withsome examples) for not breaking binary compatibility between releases of a library.
  • ABI Analysis Tools – a set of open-source tools for analysis of ABI and backward binary compatibility implementing KDE Techbase Policies
Parts,
conventions
Related topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Binary-code_compatibility&oldid=1221272726"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp