[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: smarter way to differ architectures needed?



>>>>> Brian May writes:

 BM> What does ABI stand for/mean?

Application Binary Interface.  An API is the Application Programming
Interface.

Here are two code snippets with the same API, but different ABIs:

int bar (void);
#define foo bar

and:

int foo (void);

The programmer just calls `foo ()', but the binary contains references
either to foo or bar.  That results in more than one ABI, and it means
that the binaries are incompatible.

On the other hand:

int bar (void);
int foo (void); /* Compatibility stub. */
#define foo bar

has an ABI that is a superset of the other examples.  So, binaries
compiled with the first two examples will be compatible with ones
compiled with the third examples.

ABIs only matter when you have dynamic linkage.  It is my intent to
help the Hurd and Linux be mostly binary-compatible with one another.
Then, there would be a separate `libhurd' or `liblinux' that would
contain the ABI-incompatible parts.  If programs depended on either of
those libraries, they could not be shared, but the rest would be
portable between ABIs.

-- 
 Gordon Matzigkeit <gord@fig.org>  //\ I'm a FIG (http://www.fig.org/)
Committed to freedom and diversity \// I use GNU (http://www.gnu.org/)


Reply to: