Using binutils-2.12.1 on sparc64-sun-solaris2.8 to build gcc-3.1 results in relocation errors

David S. Miller
Mon Jul 15 20:40:00 GMT 2002

   From: Alan Modra <>
   Date: Tue, 16 Jul 2002 12:10:12 +0930

   On Mon, Jul 15, 2002 at 12:45:33PM -0500, Dana, Eric wrote:
   > When building some of our 64-bit libraries in C++, we are seeing
   > R_SPARC_DISP32 errors:
   Please try current binutils CVS.  If the problem isn't fixed there,
   now would be the time to shout about it.  We're about to release 2.13.

Actually this looks like some kind of code-model error.
There should not be any R_SPARC_DISP32 relocations generated
as no "call" instruction based function invocations should
be emitted with Solaris's default code model.

"Call" is the only way R_SPARC_DISP32 relocations can be

I really doubt this is a binutils bug.  It is either some user
configuration error, or the libtool machinery is causing the
wrong code model to be used when generating the c++ libraries
and/or binaries.

If these folks are specifying the code-model explicitly on the
command line, and linking with libstdc++ this could cause errors
like the above as well.

More information about the Gcc-bugs mailing list