This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sanity of Fortran COMMONs in shared libs
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: 10 Nov 2003 21:20:31 -0500
- Subject: Re: sanity of Fortran COMMONs in shared libs
- References: <200311110058.TAA82848@bromo.msbb.uc.edu>
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