public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* .xword crashes gas on sparc
@ 1999-11-29 11:09 Alexandre Oliva
  1999-11-29 14:26 ` Jakub Jelinek
  1999-12-02 22:58 ` Alexandre Oliva
  0 siblings, 2 replies; 6+ messages in thread
From: Alexandre Oliva @ 1999-11-29 11:09 UTC (permalink / raw)
  To: binutils

This is the first of a series of problem reports I'm going to post.  I
intend to try to fix them, but I wouldn't mind if someone gets to it
first :-)

egcs is now multilibbed 32/64 on Solaris7/sparc, and the -m64 version
fails to compile _trampoline.o for libgcc.  Here's a reduced testcase,
that presents the same problem:

echo '.xword foo' | /n/gnu/bin/as -
{standard input}: Assembler messages:
{standard input}:1: Fatal error: {standard input}:1: bad return from bfd_install_relocation

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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

* Re: .xword crashes gas on sparc
  1999-11-29 11:09 .xword crashes gas on sparc Alexandre Oliva
@ 1999-11-29 14:26 ` Jakub Jelinek
  1999-11-30 16:01   ` Alexandre Oliva
  1999-12-02 22:58 ` Alexandre Oliva
  1 sibling, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 1999-11-29 14:26 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: binutils

On Mon, Nov 29, 1999 at 05:09:25PM -0200, Alexandre Oliva wrote:
> This is the first of a series of problem reports I'm going to post.  I
> intend to try to fix them, but I wouldn't mind if someone gets to it
> first :-)
> 
> egcs is now multilibbed 32/64 on Solaris7/sparc, and the -m64 version
> fails to compile _trampoline.o for libgcc.  Here's a reduced testcase,
> that presents the same problem:
> 
> echo '.xword foo' | /n/gnu/bin/as -
> {standard input}: Assembler messages:
> {standard input}:1: Fatal error: {standard input}:1: bad return from bfd_install_relocation

Which binutils are that and how they were configured?
Cannot reproduce it here (sparc64-redhat-linux, configured with
sparc-redhat-linux --enable-targets sparc64-linux):

[root@tucnak /root]# as --version
GNU assembler 2.9.5
Copyright 1997 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.
This assembler was configured for a target of `sparc-redhat-linux'.
[root@tucnak /root]# echo '.xword foo' | as -Av9a -64
[root@tucnak /root]# ls -l a.out
-rw-r--r--   1 root     root          792 Nov 29 23:15 a.out

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

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

* Re: .xword crashes gas on sparc
  1999-11-29 14:26 ` Jakub Jelinek
@ 1999-11-30 16:01   ` Alexandre Oliva
  1999-12-01  0:07     ` Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Oliva @ 1999-11-30 16:01 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: binutils

On Nov 29, 1999, Jakub Jelinek <jakub@redhat.com> wrote:

> On Mon, Nov 29, 1999 at 05:09:25PM -0200, Alexandre Oliva wrote:
>> echo '.xword foo' | /n/gnu/bin/as -
>> {standard input}: Assembler messages:
>> {standard input}:1: Fatal error: {standard input}:1: bad return from bfd_install_relocation

> Which binutils are that and how they were configured?

I've got this with binutils 2.9.1 and 2.9.5.0.21 on sparc-sun-solaris7
and binutils 2.9.1 and RedHat's 2.9.1.0.23-7 on
sparc64-unknown-linux-gnu, but not with 2.9.5.0.21 on
sparc64-unknown-linux-gnu.  No particular arguments were passed to
configure.

Ian told me in private he did reproduce the bug on some Solaris2 box.

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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

* Re: .xword crashes gas on sparc
  1999-11-30 16:01   ` Alexandre Oliva
@ 1999-12-01  0:07     ` Jakub Jelinek
  1999-12-01 12:49       ` Alexandre Oliva
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 1999-12-01  0:07 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: binutils

On Tue, Nov 30, 1999 at 10:00:43PM -0200, Alexandre Oliva wrote:
> On Nov 29, 1999, Jakub Jelinek <jakub@redhat.com> wrote:
> 
> > On Mon, Nov 29, 1999 at 05:09:25PM -0200, Alexandre Oliva wrote:
> >> echo '.xword foo' | /n/gnu/bin/as -
> >> {standard input}: Assembler messages:
> >> {standard input}:1: Fatal error: {standard input}:1: bad return from bfd_install_relocation
> 
> > Which binutils are that and how they were configured?
> 
> I've got this with binutils 2.9.1 and 2.9.5.0.21 on sparc-sun-solaris7
> and binutils 2.9.1 and RedHat's 2.9.1.0.23-7 on
> sparc64-unknown-linux-gnu, but not with 2.9.5.0.21 on
> sparc64-unknown-linux-gnu.  No particular arguments were passed to
> configure.
> 
> Ian told me in private he did reproduce the bug on some Solaris2 box.

If as defaults to elf32_sparc (which I think is the case), then I don't know
actually what kind of relocation should it emit anyway.
Sun's as does not work with it either. The message is funny, because .xword
is IMHO not an instruction, but anyway.

slowlaris:~# echo '.xword foo' > a.s
slowlaris:~# as -xarch=v8plusa a.s
as: "a.s", line 1: error: cannot use v9 instructions in a non-v9 target binary

If you use

.nword foo

then it will behave correctly no matter if you use elf32_sparc or elf64_sparc
(but you have to make sure you read it with ldn and not ldx or ld).
I wonder whether it makes sense to just emit for .xword foo ".word 0, foo"
provided foo is not a constant or whether we should die when .xword is
detected with non-constant in -32.

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

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

* Re: .xword crashes gas on sparc
  1999-12-01  0:07     ` Jakub Jelinek
@ 1999-12-01 12:49       ` Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 1999-12-01 12:49 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: binutils

On Dec  1, 1999, Jakub Jelinek <jakub@redhat.com> wrote:

> If as defaults to elf32_sparc (which I think is the case), then I don't know
> actually what kind of relocation should it emit anyway.

If it accepts the flags -64 and -Av9, it had better support
elf64_sparc too.  Anyway, current releases don't reject these flags,
so gcc will have to test for `.xword' support or something equivalent
to decide whether to enable 32/64bit on Solaris.  But it would be nice
if binutils defaulted to 32/64bit support on Solaris7+.

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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

* Re: .xword crashes gas on sparc
  1999-11-29 11:09 .xword crashes gas on sparc Alexandre Oliva
  1999-11-29 14:26 ` Jakub Jelinek
@ 1999-12-02 22:58 ` Alexandre Oliva
  1 sibling, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 1999-12-02 22:58 UTC (permalink / raw)
  To: binutils

On Nov 29, 1999, Alexandre Oliva <oliva@lsd.ic.unicamp.br> wrote:

> echo '.xword foo' | /n/gnu/bin/as -
> {standard input}: Assembler messages:
> {standard input}:1: Fatal error: {standard input}:1: bad return from bfd_install_relocation

As others have said, this is caused by the fact that -64 was not
given.  Unfortunately, on sparc-*-solaris*, when -64 is given, gas
just says 64bit support is not enabled.

Since the native toolchain of Solaris7 does support 64 bits by
default, I think so should ours.  Here's a patch:

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

end of thread, other threads:[~1999-12-02 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-29 11:09 .xword crashes gas on sparc Alexandre Oliva
1999-11-29 14:26 ` Jakub Jelinek
1999-11-30 16:01   ` Alexandre Oliva
1999-12-01  0:07     ` Jakub Jelinek
1999-12-01 12:49       ` Alexandre Oliva
1999-12-02 22:58 ` Alexandre Oliva

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).