internal error: R_X86_64_32 relocation out of range
$ ghci Stub.hs Whirlpool.o
GHCi, version 6.8.2.20080316: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Loading object (static) Whirlpool.o ... done
ghc-6.8.2.20080316: internal error: R_X86_64_32 relocation out of range: (noname) = 0x7fc20c2c3010
(GHC version 6.8.2.20080316 for x86_64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Aborted (core dumped)
I'm running Ubuntu 8.4 Beta on some sort of Intel 64-bit platform (Core, maybe?).
To reproduce, you'll want the files from http://planeta.terra.com.br/informatica/paulobarreto/whirlpool.zip
And in the same directory, the attached files Stub.hs and Whirlpool.h (not needed just to compile the .c file, but it makes the haskell FFI happy).
There are a couple things I tried
First:
$ gcc Whirlpool.c -c
$ ghci Stub Whirlpool.o
<linker error>
Second:
$ rm *.o
$ ghc --make Stub Whirlpool.c
$ ghci Stub Whirlpool.o
<linker error>