[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: darwin/Fortran: -single_module

From: Peter O'Gorman
Subject: Re: darwin/Fortran: -single_module
Date: Fri, 02 Dec 2005 10:48:21 +0900
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Hash: SHA1

Peter O'Gorman wrote:

| -single_module is only there for c++ because on Mac OS X 10.3 and
| earlier the dynamic linker would not call static initializers in
| tranlation units which did not have any other symbols referenced. It is
| not the default because nobody has persuaded me that making your shared
| library much more difficult to debug is worth whatever gain the
| -single_module flag gives.

I have been persuaded that -single_module should be the default (probably
only for HEAD for now patch coming soon).

from #opendarwin on (lightly edited):

< pogma> I heard rumors that it is advantageous for load times to build
shared libraries -single_module. Does anyone have numbers on that?

< shantonu> the Panther dyld had algorithms that were O(n) in the number of
modules. multi-module dylibs would make things painful, esp. for things like
libsystem that have like 7000 modules. the new dyld might not have the same
issues the other advantage is that a single-module dylibe eliminates many of
the cross-module dyld stubs and replaces them with direct branches
< shantonu> so this can be faster at runtime
< shantonu> the disadvantage is that it's harder to override functions at
static link time

< pogma> last time I looked -single_module was harder to debug also, maybe I
was just doing it wrong? iirc gdb could not find the source code
< shantonu> there shouldn't be a difference
< chandler> dude, * is hard to debug on OS X
< pogma> okay

< shantonu> all my frameworks are single module and i haven't had problems
< shantonu> -single_module is the default for ld64
< shantonu> it's also the default for Xcode

Notes: dyld is the darwin dynamic linker, ld64 is the 64 bit linker and
Xcode is the GUI IDE.
Version: GnuPG v1.4.0 (Darwin)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]