[GHC] #1021: GHC static libraries are not position independent
in OSX
GHC
trac at galois.com
Wed Nov 22 06:59:05 EST 2006
#1021: GHC static libraries are not position independent in OSX
--------------------------+-------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: powerpc
Os: MacOS X |
--------------------------+-------------------------------------------------
Comment (by wolfgang):
There is a flag for Apple's linker, -read_only_relocs suppress, which
allows you to link bundles with non-position-independent code.
Position-independent code is *not* strictly required to build a bundle or
a dynamic library, but:
* position-dependent bundles/libraries take slightly longer to load,
because they have to be relocated at load-time
* if more than one process uses the bundle/library, it has to be loaded
into memory separately for each process, i.e. the "shared" library is not
really "shared".
On the other hand, position-independent code is slightly bigger and slower
than position-dependent code (on most platforms, including powerpc and
x86), so -fPIC was left off by default. Everyone, feel free to comment.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1021>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list