renamed GMP symbols in GHC

Joachim Breitner nomeata at
Thu Jan 5 22:15:10 CET 2012


Am Donnerstag, den 05.01.2012, 14:14 -0500 schrieb Brandon Allbery:
> On Thu, Jan 5, 2012 at 13:53, Joachim Breitner <nomeata at>
> wrote:
>         (But I am really wondering why the linker cannot do something
>         that has
>         the same effect as objcopy --prefix-symbols, but on the fly.)
> Some of them can; notably the binutils ld, which comes from the same
> source as and uses the same mechanism as objcopy.

they do? I couldn’t any flag in that direction.

I just tried a few combinations with a simple testprogram (git repo
attached, every commit is one state). Unfortunately, using dlopen does
not not help if some other shared library loads gmp regularly; there is
still only one global state. And statically linking gmp into the share
object does not work, as Simon predicted, because the static gmp library
is not compiled with PIC. The promising ld option "-Bgroup" does not
seem to have the desired effect.

If only dlopen had RTDL_PRIVATE support...


Joachim "nomeata" Breitner
Debian Developer
  nomeata at | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-link-test.tar.gz
Type: application/x-compressed-tar
Size: 23700 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Glasgow-haskell-users mailing list