This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42568] [Cygwin] BLOCKDATA referenced in EXTERNAL not loading from library
- From: "davek at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2010 18:05:42 -0000
- Subject: [Bug fortran/42568] [Cygwin] BLOCKDATA referenced in EXTERNAL not loading from library
- References: <bug-42568-18131@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from davek at gcc dot gnu dot org 2010-01-04 18:05 -------
(In reply to comment #16)
> You made an unmerited assertion that "COMMON symbols don't cause
> members to be pulled in from library archives." I've shown the
> counter example.
On what platform?
> This appears to be linker issue on cygwin.
It appears to be the entirely correct behaviour of the linker on PE-COFF
platforms; I don't know about ELF platforms, which may well behave differently.
Why do you supposed the "forceload" mechanism existed in g77 if not to allow
the compiler to generate code that worked regardless of the target object
format?
See here: http://www.airs.com/blog/archives/48
>"In general the linker will not include archives if they provide a definition for a common symbol."
Isn't that what's going on here?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42568