This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ld: common symbols not allowed with MH_DYLIB outputformat with the -multi_module option
- From: "Sam Lauber" <sam124 at operamail dot com>
- To: "Mike Stump" <mrs at apple dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 13 Jun 2005 20:17:35 +0100
- Subject: Re: ld: common symbols not allowed with MH_DYLIB outputformat with the -multi_module option
> Sigh. #2 doesn't work as the compiler can synthesize common
> variables that you can't control, and when it does this, things
> won't work. Forcing people to use -single_module strikes me as
> wrong.
I don't know why it was set up like that. Come to think of it, this would
probably be a really good thread to forward to the Darwin mailing lists. They
would probably know ;-).
> So, from the standpoint of good advice, -fno-common is the only answer.
But if you already have good code (who would make a shared library out of
poorly written code?), then you should use -single_module because the only
visible influence on the resulting library is linker diagnostics, but a good
shared library wouldn't trigger any linker errors. (And plus, the linker does a
good job of finding errors before the library even gets stored to disk, unless
you use options like `-undefined dynamic_lookup').
Samuel Lauber
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com
Powered by Outblaze