This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: .xword crashes gas on sparc
- To: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Subject: Re: .xword crashes gas on sparc
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 1 Dec 1999 09:11:42 +0100
- Cc: binutils at sourceware dot cygnus dot com
- References: <or903hcdy2.fsf@cupuacu.lsd.ic.unicamp.br> <19991129232857.Q515@mff.cuni.cz> <orpuwr4jis.fsf@cupuacu.lsd.ic.unicamp.br>
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)
___________________________________________________________________