This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sanity of Fortran COMMONs in shared libs


Jack Howarth <howarth@bromo.msbb.uc.edu> writes:

>     Does anyone know what the exact situation is with relation
> to Fortran code with COMMON statements and their use in g77
> built shared libs. I am greatly puzzled why this same code
> builds and works fine under Linux (ppc and i386) yet pukes on
> Darwin. Is it just pure chance that this code works on Linux
> at all?

The GNU linker has several tweaks for common symbols in shared
libraries, specifically to support Fortran.  This support is all in
ELF.

Darwin doesn't use ELF, and it doesn't use the GNU linker (at least,
not the mainline GNU linker--I don't really know what it uses).  I
have no idea whether they have done the same work to support common
symbols in shared libraries.

So it is not pure chance that it works on GNU/Linux.  But it may not
be easy to get it to work on Darwin.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]