Replacement for GMP as Bignum: ARPREC? Haskell?; OS-X and OpenSSL

Brian Hulley brianh at
Sun Jul 30 09:14:57 EDT 2006

Esa Ilari Vuokko wrote:
> Hi Brian,
> On 7/30/06, Brian Hulley <brianh at> wrote:
>> Still, a slight problem is that since there is one object file per
>> source file, the names of the object files give quite a lot of
>> information away about the structure of the program especially when
>> they are arranged in a module hierarchy, so I'll be glad when GMP is
>> replaced by something without such a burdensome licence. (Although
>> perhaps I can bundle my object files into a single library file but
>> I don't know how to do this yet, or if it would really help in the
>> goal to make the code completely obfuscated, impenetrable, and
>> unavailable to any rival company... ;-) )
> Assuming gnu toolchain, you can use ld to link object
> files together in a form that is definitely harder to break apart.
> (incremental linking to incomplete executable, iirc via switch -x).
> That should allow you to produce one big object file (of atleast
> haskell bits and c bits) that gets simply passed to ghc.
> Using strip to remove debug info/symbol tables also helps somewhat.
> (strip.exe is not part of ghc distribution, but you can find it in
> mingw bintools.)
> Using ar to create archives does not help at all - you can extract the
> original files using ar itself.

Thanks - I must look into these mingw tools (at the moment I'm just using 
the plain GHC Windows distro)
I think the ideal solution in the long term would be if the windows version 
of GHC could put each LGPL lib such as GMP (are there any more?) into its 
own DLL so that it would only statically link user code + BSD3 stuff into 
the main executable. Then it would be very simple to distribute Windows apps 
(WinXP allows DLLs to be local to a specific app by putting them in the same 
directory as the exe) and would mirror the way GHC works on Unix (and would 
also make it easier for people to use updated LGPL components with the app 
in the spirit of LGPL).

Best regards

Logic empowers us and Love gives us purpose.
Yet still phantoms restless for eras long past,
congealed in the present in unthought forms,
strive mightily unseen to destroy us. 

More information about the Glasgow-haskell-users mailing list