Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Talk about the Linux ABI compatibility Application     - Oracle 11g maintenance partitions - Adding Partitions (Database)

- Linux Fundamentals of the memory management mechanism (Linux)

- High-performance JavaScript loops and flow control (Programming)

- Security of data to create a safe .mdb database (Linux)

- Installed in the desktop version of Ubuntu Unity Tweak Tool (Linux)

- CentOS directory structure Explanation (Linux)

- Oracle 11g statistics collection - collection of multi-column statistics (Database)

- Use Vagrant build cross-platform development environment for Python (Server)

- Restore database fault encountered ORA-0600 (Database)

- PostgreSQL-- run Supervisord on Docker in Ubuntu (Database)

- Eclipse installs support for Java 8 (Linux)

- Computer black magic: tail recursion (Programming)

- Why you can have JavaScript string method (Programming)

- Android realize RippleEffect water (Programming)

- C ++ overloaded stream insertion operator and the stream extraction operator (Programming)

- New experience Budgie (Budgerigar) desktop environment (Linux)

- Build your own Git server under Linux (Server)

- Ubuntu 14.04 Nvidia proprietary drivers for install two graphic cards (Linux)

- MongoDB replication instance (Database)

- C / C ++ language variable scope: local variables, global variables, file-level variables (Programming)

  Talk about the Linux ABI compatibility Application
  Add Date : 2016-11-14      

Work recently encountered a problem that the system ran multiple different versions of the kernel, different architectures ARM chip, the upper operational procedures can go a binary (co Mirror).

According to their own understanding of Linux, glibc can be done whether forward compatible ABI levels. The entire system can do it? This whetted our analysis and reflection.

ABI compatible dependent on what

Imagine a program from source code into the final binary, which components are involved in the compiling and linking process, probably as follows:

Export user mode kernel header files
gcc compiler, gcc provides static .o / .a, and it provides a dynamic library (such as libgcc_s.so)
Third-party open source library
We need to analyze each group can be done through binary compatibility, and how to do. Here I have the components to Mind Map to analyze whether it can meet the ABI compatibility.

I think the mind map components are broken down to every detail covered. Of course, there will be some details that I did not expect. Next, the not-so-common components will be described below:

Export kernel header file: Build over cross compiler tool chain is embedded inside often do, need to build the kernel exported guide file tool chain. This is a kernel mode and user agreement good foundation types and data structures, such as our common time_t, pid_t etc. type. Whole in user mode software to it as the cornerstone.
glibc version mechanism: glibc for most symbols are marked with a version number, in future versions of glibc high, since the POSIX changes / LSB standard, or a function of the interface has changed, it will create another new version of the symbol, but the original version symbols remain, while semantics and parameters remain unchanged. It is through this mechanism to ensure ABI forward compatibility (Note that backward compatibility is not guaranteed)
From the analysis, most of the software is to maintain backwards compatibility. This is why the program is copied from one mechanism to another on the mechanisms, procedures still running.

Linux standard Base (LSB)

Oh, in the end this is a coincidence? Or what: all Linux programs are run on all machines. I also bring a problem to find some of this information.
I would like to believe we have heard POSIX specification, Linux Standard Base (LSB) specification. At first, I thought LSB specification is API instead ABI specification. When I go in-depth analysis, we found that it is an ABI specification, it addresses two issues:

Program on the release of Linux A run can run on the release version of Linux B.
Applications running on the current machine, can also run on the new system and future machines.
Linux Foundation recently launched LSB project is hoped that Linux distributors can do mutually compatible, and can also forward-compatible. Troubleshooting Linux application portability and compatibility.

LSB is actually the definition of ABI interface, a group that regulates the type of operating environment required, macros, variables, and functions of the binary interface.

So, what constraints do things by the LSB? That LSB specification constraint range more widely. At first, I thought some of the key components of only kernel, glibc and the like. In fact, the official website open the LSB will find it explained everything from the command, ELF, glibc interface to the desktop, scripting languages, and so have the relevant regulations.

Who should follow the LSB specification

Undoubtedly, kernel, glibc and so should follow LSB standards. The thing is not so. LSB hope Linux distributions (such as RedHat, SUSE, Ubuntu) to comply with the LSB, it provides LSB LSB test suite and certification services.

Then Kernel and glibc LSB really no need to consider it, the answer is no. Whole kernel / glibc and major Linux components are well-known in the open source approach to development, the technology inside it is nothing secretive, the major companies have engineers involved, all companies want to comply with these software are LSB, all software We can easily together, do not want to let happen salesmen spend a lot of effort to integrate. Therefore, all the software will try to comply with the LSB specification, but can not rule out that one or two exceptions Case.

glibc is our most used components, can be considered one of the components I do understand, and to the Internet to find some of its compatibility analysis and found that it can not guarantee 100% forward compatible. Is not fully compatible occurred in two versions 2.16.0 and 2.13. For the average current software, this compatibility is perfectly adequate for.

"Backward" compatibility

So Linux can do it backwards compatibility? The answer is no, because the LSB can not do backwards compatibility.

The question is, if I need to do it backwards compatible? If this scenario has the following:

Many servers are Ubuntu 7.04, regarded as 8 years ago, a server, a lot of quantity. There will also be a server 12.04, less quantity. But the compiler 12.04 on newer, supports many security features. Architect appeal is: Can run on version 12.04 do development environment compiler, the generated service program can run simultaneously on two servers 7.04 and 12.04.

I can think of a solution:

Find Ubuntu 7.04 and 12.04 two servers running software, which comply with the LSB version service program can be called only two LSB is fully compatible interfaces
When programming and link service, you can specify that the program uses LSB standard (Ubuntu 7.04 version of the LSB).
For the first method, personally I think that is feasible, but a lot of constraints. Method two unknown feasible, subsequent reanalysis

This is a problem, "backward" compatibility wish to discuss. It is not really backward compatibility, is entirely dependent on the forward-compatible to achieve.


Compatibility, absolutely not something I am familiar with, but encountered a problem at work, do a preliminary analysis. I hope that through the blog record thinking, when one day, I have a deep experience of this knowledge, talk to share with you. If written is incorrect, or misleading, please correct me, thank you!
- Share Practical Tutorial GitHub (Linux)
- Several Ceph performance optimization of new methods and ideas (2015 SH Ceph Day after flu reference) (Server)
- Linux shell script debugging (Linux)
- How to Install Telegram instant messaging software on Ubuntu (Linux)
- VirtualBox CentOS is configured as a local disk mirroring software source (Linux)
- Using VMware vSphere Client Linux virtual machine installation CentOS6.4 system (Linux)
- Linux ls command (Linux)
- DELL D630 Wireless LAN Driver Installation CentOS6 (Linux)
- PXE install CentOS 6.4 (Linux)
- Six Ways to view slides can be implemented Android (Programming)
- To install CentOS 6.5 on your hard drive under Windows 7 (Linux)
- Linux System Getting Started Tutorial: How to find the maximum memory your system supports (Linux)
- How to enable fbcon in Debian (Linux)
- Spring Data JPA call a stored procedure examples (Programming)
- SELinux multi-level security (Linux)
- How to deploy Icinga client (Server)
- Awk include binding capacity larger than the specified size of all files directory (Linux)
- Java reflection summary (Programming)
- JDK installation notes under CentOS (Linux)
- Create your own YUM repository (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.