[Lazarus] Troll Tech and Inprise/Borland Collaborate on LinuxGUI

Andreas Kostyrka andreas at mtg.co.at
Sat Apr 29 06:40:37 EDT 2000

On Fri, Apr 28, 2000 at 06:30:44PM -0700, Curtis White wrote:
> Florian Klaempfl wrote:
> So if I compile a .so file with gcc and then I compile a .so file with FPC, do
> those two .so files work differently internally?  This is really confusing to
Well, this is called ABI: Application Binary Interface.

The basic stuff is defined by Intel (which made some errors, like aligning
doubles at every 4th byte, instead of 8th byte, which slows double using
programs on anything after a Pentium), but the higher level conventions
come from the compiler.

C++ needs much more infrastructure then C, so there are a number of conventions
built into the compilers. On Windows it's a well known thing that all parts
(DLLs) must come from the same C++ compiler. On Linux this has been less of
a problem, because almost all compilers are derived from gcc/egcs backend,
and as such use the gcc/egcs conventions. FPC OTOH, is a standalone compiler.

> me because I had thought an executable was the same no matter which compiler
> it was compiled with.  I always thought the compiler just took the source code
> and made it into assembly and then the linker turned it into binary code. I
> didn't know that the binary code was different depending on which compiler you
> use. That is interesting.
Well, it's a number of thing: Calling conventions, Name Mangling, error and
exception handling, and struct(RECORD) layout stuff.

> What about on Windows? Is an .exe or .dll file that is compiled with FPC
> different than an .exe or .dll file compiled with Borland C++ Builder or MS
> Visual C++ or Delphi?
Jep, it is.

Andreas Kostyrka                     | andreas at mtg.co.at
phone: +43/1/7070750                 | phone: +43/676/4091256   
MTG Handelsges.m.b.H.                | fax:   +43/1/7065299
Raiffeisenstr. 16/9                  | 2320 Zwoelfaxing AUSTRIA        
http://www.euro.cauce.org/           | http://www.cauce.org/

More information about the Lazarus mailing list