Ok, it seems that the problem is in the link flags. I first realized that Sun's compiler did not have the problem

-bash-4.0$ cc -dy -G -z text -o foo.so ../opensolaris/build/libeclgmp.a -Bdynamic -lc

and then tried adding -shared to the GCC flags

-bash-4.0$ gcc -shared -dy -G -Wl,-ztext -o foo.so ../opensolaris/build/libeclgmp.a -Bdynamic -lc

So it does not suffice the standard shared-library linking flags for Solaris (-dy -G), one also has to add GCC's own flag (-shared) to let it link in a different C runtime.

Juanjo

--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com