public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Using binutils-2.12.1 on sparc64-sun-solaris2.8 to build gcc-3.1  results in relocation errors
@ 2002-07-15 10:46 Dana, Eric
  2002-07-15 19:56 ` Alan Modra
  0 siblings, 1 reply; 12+ messages in thread
From: Dana, Eric @ 2002-07-15 10:46 UTC (permalink / raw)
  To: 'binutils@sources.redhat.com', 'gcc-bugs@gcc.gnu.org'

When building some of our 64-bit libraries in C++, we are seeing
R_SPARC_DISP32 errors:

../../../obj/sun/sparc-solaris2.7W/monitor/lib/Agent/libAgent.a(alert.o):iti
merspec/alert.C:37:
    relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN10printClass5printEiPKc
../../../obj/sun/sparc-solaris2.7W/monitor/lib/Agent/libAgent.a(alert.o):iti
merspec/alert.C:37: 
    relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN10printClass6indentEi
../../../obj/sun/sparc-solaris2.7W/monitor/lib/Agent/libAgent.a(agentConditi
on.o):itimerspec/agentCondition.C:50:
    relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN10printClass5printEiPKcm
and many, many more...

This happens on Solaris 2.7/2.8 when linking  64-bit objects.
Below is a reference from another developer (taken from the binutils
archives)

   2002-05/msg01920.html   

At this time we have no workaround. Can a previous version of binutils be
used on Solaris with 64-bit linking
with GCC 3.1 or later?

--Eric Dana--
BMC Software Inc.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Using binutils-2.12.1 on sparc64-sun-solaris2.8 to build gcc-3.1  results in relocation errors
@ 2002-07-15  8:24 Dana, Eric
  0 siblings, 0 replies; 12+ messages in thread
From: Dana, Eric @ 2002-07-15  8:24 UTC (permalink / raw)
  To: 'binutils@sources.redhat.com', 'gcc-bugs@gcc.gnu.org'

When building some of our 64-bit libraries in C++, we are seeing
R_SPARC_DISP32 errors:

../../../obj/sun/sparc-solaris2.7W/monitor/lib/Agent/libAgent.a(alert.o):iti
merspec/alert.C:37:
    relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN10printClass5printEiPKc
../../../obj/sun/sparc-solaris2.7W/monitor/lib/Agent/libAgent.a(alert.o):iti
merspec/alert.C:37: 
    relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN10printClass6indentEi
../../../obj/sun/sparc-solaris2.7W/monitor/lib/Agent/libAgent.a(agentConditi
on.o):itimerspec/agentCondition.C:50:
    relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN10printClass5printEiPKcm
and many, many more...

This happens on Solaris 2.7/2.8 when linking  64-bit objects.
Below is a reference from another developer (taken from the binutils
archives)

   2002-05/msg01920.html   

At this time we have no workaround. Can a previous version of binutils be
used on Solaris with 64-bit linking
with GCC 3.1 or later?

--Eric Dana--
BMC Software Inc.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Using binutils-2.12.1 on sparc64-sun-solaris2.8 to build gcc-3.1 results in relocation errors
@ 2002-05-28  7:50 Brad Spencer
  2002-07-29 20:53 ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: Brad Spencer @ 2002-05-28  7:50 UTC (permalink / raw)
  To: binutils

I've looked through the archives and the comments in gcc-3.1, and it
looks like this might be some sort of new feature that doesn't quite
work correctly.  If I configure gcc-3.1 on top of binutils-2.12.1,
then when I link 64-bit objects, I get things to the effect of

netra-map1:~$ g++ -Wall -m64 -o foo foo.cc -save-temps
/opt/gcc-3.1/lib/gcc-lib/sparc-sun-solaris2.8/3.1/../../../sparcv9/libstdc++.a(stl-inst.o)(.eh_frame+0xf0):
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZNSt24__default_alloc_templateILb1ELi0EE8allocateEm

This is totally a Hello World application:

static const char *st_ID __attribute__((unused)) =
"$Id$";

#include <iostream>

int
main()
{
  std::cout << "hello world" << std::endl;
  return 0;
}

When I configure gcc-3.1 on top of binutils-2.11.2, this doesn't
happen.  

netra-map1:~$ g++ -m64 -Wall -o foo foo.cc -save-temps
netra-map1:~$ ./foo
hello world

Inside gcc-3.1/gcc/config/sparc/sparc.h, I find the following
comment: 

   /* [...]
   binutils 2.12 would emit a R_SPARC_DISP32 dynamic relocation if the
   symbol %r_disp32() is against was not local, but .hidden.  In that
   case, we have to use DW_EH_PE_absptr for pic personality.  */

From what I can tell from this mailing list, the %r_dispX notation is
a new feature in gas.  Is this a bug?

netra-map1:~$ gcc -v
Reading specs from
/opt/gcc-3.1/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs
Configured with: ../gcc-3.1/configure --with-dwarf2
--enable-languages=c,c++ --enable-threads=single --disable-shared
--with-gnu-as --with-gnu-ld --with-as=/opt/bin/as
--with-ld=/opt/bin/ld --prefix=/opt/gcc-3.1
Thread model: single
gcc version 3.1
netra-map1:~$ gcc -print-prog-name=as
/opt/bin/as
netra-map1:~$ /opt/bin/as --version
GNU assembler 2.11.2
netra-map1:~$ gcc -print-prog-name=ld
/opt/bin/ld
netra-map1:~$ /opt/bin/ld --version
GNU ld 2.11.2
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License.  This program has absolutely no
warranty.
  Supported emulations:
   elf32_sparc
   elf64_sparc

        
-- 
-----------------------------------------------------------------
Brad Spencer - spencer@infointeractive.com - "It's quite nice..."
  Systems Architect | InfoInterActive Corp. | An AOL Company

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-07-30 12:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-15 10:46 Using binutils-2.12.1 on sparc64-sun-solaris2.8 to build gcc-3.1 results in relocation errors Dana, Eric
2002-07-15 19:56 ` Alan Modra
2002-07-16  0:14   ` David S. Miller
2002-07-17 10:54     ` Teemu Torma
2002-07-17 18:32       ` Alan Modra
2002-07-17 20:20         ` David S. Miller
2002-07-18  8:17           ` Teemu Torma
2002-07-18  0:45     ` Jakub Jelinek
  -- strict thread matches above, loose matches on Subject: below --
2002-07-15  8:24 Dana, Eric
2002-05-28  7:50 Brad Spencer
2002-07-29 20:53 ` Daniel Jacobowitz
2002-07-30  5:22   ` Brad Spencer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).