This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
re: Why doesn't -fno-common really work???
- From: Jack Howarth <howarth at nitro dot med dot uc dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 6 Nov 2003 09:44:33 -0500 (EST)
- Subject: re: Why doesn't -fno-common really work???
Looking at this same code compiled on RedHat 8.0 I see
that for fortran code using .fcm files that contain
COMMON blocks like...
COMMON /CCOMND/ CHR, WD, WDT, WDD, COMLYN, DISLYN,
the resulting object files from compilation with g77
has common symbols despite being compiling the
source with -fno-common...
nm *.o | grep ccomnd
000a1d2a C ccomnd_
000a1d2a C ccomnd_
...
However when these object files are linked together into a
shared object with...
g++ -shared --whole-archive -Xlinker -export-dynamic
the resulting .so shows...
00fad220 B ccomnd_
Is this the presence of the common symbols in object code
compiled in g77 with -fno-common really non-broken behavior?
I ask because this issue give the Darwin link fits when
attempting to create a shared lib in normal -multi_module
mode. Would it be possible to fix g77 to really suppress
these common symbols as the -fno-common dictates?
Thanks in advance for any insights on this.
Jack
------------------------------------------------------------------------------
Jack W. Howarth, Ph.D. 231 Albert Sabin Way
NMR Facility Director Cincinnati, Ohio 45267-0524
Dept. of Molecular Genetics phone: (513) 558-4420
Univ. of Cincinnati College of Medicine fax: (513) 558-8474