Generalize linkDynLib for ELF platforms
authorClemens Fruhwirth <clemens@endorphin.org>
Wed, 27 Jun 2007 09:08:19 +0000 (09:08 +0000)
committerClemens Fruhwirth <clemens@endorphin.org>
Wed, 27 Jun 2007 09:08:19 +0000 (09:08 +0000)
commit36767013af1bc178b2480ae99041b9bdabaebe86
tree848ab367bc3c3e838f1b43fc1d06583717a7f719
parentb562cbe381d54e08dcafa11339e9a82e781ad557
Generalize linkDynLib for ELF platforms

To create a dynamic shared object (DSO) on ELF platforms, we invoke
"gcc -shared". This in turn invokes ld. We supply -Bsymbolic to the
linker, as "ld -Bsymbolic -shared -o <lib> <objs>" resolves all
references from <objs> to <objs> at library creation time.

See http://hackage.haskell.org/trac/ghc/wiki/Commentary/PositionIndependentCode
compiler/main/DriverPipeline.hs