public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Brad Spencer <spencer@infointeractive.com>
To: binutils@sources.redhat.com
Subject: Re: Using binutils-2.12.1 on sparc64-sun-solaris2.8 to build gcc-3.1 results in relocation errors
Date: Tue, 30 Jul 2002 05:22:00 -0000	[thread overview]
Message-ID: <20020730090438.D7649@infointeractive.com> (raw)
In-Reply-To: <20020730033423.GA15581@nevyn.them.org>; from drow@mvista.com on Mon, Jul 29, 2002 at 11:34:23PM -0400

On Mon, Jul 29, 2002 at 11:34:23PM -0400, Daniel Jacobowitz wrote:
> On Tue, May 28, 2002 at 11:49:49AM -0300, Brad Spencer wrote:
> > 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
> 
> Could you try this with a 2.13 snapshot?  There's one in
> /pub/binutils/snapshots, marked 2.12.91.

I will try this today and report back.  It's my understanding I'll
need >=2.12 for gcc-3.2, so this was a pleasant surprise :)

> > 
> > 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
> 
> -- 
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer

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

  reply	other threads:[~2002-07-30 12:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-28  7:50 Brad Spencer
2002-07-29 20:53 ` Daniel Jacobowitz
2002-07-30  5:22   ` Brad Spencer [this message]
2002-07-15  8:24 Dana, Eric
2002-07-15 10:46 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020730090438.D7649@infointeractive.com \
    --to=spencer@infointeractive.com \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).