Bug 11516 - Fatal error assembling jsr for Alpha ECOFF
Summary: Fatal error assembling jsr for Alpha ECOFF
Status: RESOLVED OBSOLETE
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-19 16:00 UTC by Rainer Orth
Modified: 2023-05-17 07:14 UTC (History)
1 user (show)

See Also:
Host:
Target: alpha-dec-osf5.1b
Build:
Last reconfirmed:


Attachments
Fix segfault (344 bytes, patch)
2010-04-20 14:28 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2010-04-19 16:00:47 UTC
Current gas fails to assemble the following trivial testcase:

$ cat jsr.s
        jsr $26,getpagesize
$ gas -o jsr.o jsr.s
jsr.s: Assembler messages:
jsr.s:1: Fatal error: unhandled relocation type (null)
Comment 1 Nick Clifton 2010-04-20 14:28:29 UTC
Created attachment 4735 [details]
Fix segfault
Comment 2 Nick Clifton 2010-04-20 14:30:06 UTC
Hi Rainer,

  I am not an expert in this particular architecture.  The uploaded patch
prevents the seg-fault, but the assembler now responds with:

  Error: invalid relocation for field

Is this what you would expect ?

Cheers
  Nick
Comment 3 Rainer Orth 2010-04-20 19:04:18 UTC
Subject: Re:  Fatal error assembling jsr for Alpha ECOFF

Hi Nick,

>   I am not an expert in this particular architecture.  The uploaded patch

neither am I: I just happen to maintain the GCC port to Tru64 UNIX :-)

> prevents the seg-fault, but the assembler now responds with:
>
>   Error: invalid relocation for field
>
> Is this what you would expect ?

Actually no: the native assembler assembles this just fine:

$ as -o jsr.o jsr.s
$ objdump -d jsr.o

jsr.o:     file format ecoff-littlealpha


Disassembly of section .text:

0000000000000000 <.text>:
   0:   10 80 7d a7     ldq     t12,-32752(gp)
   4:   00 40 5b 6b     jsr     ra,(t12),0x8
   8:   1f 04 ff 47     nop
   c:   00 00 fe 2f     unop

It may be related to the fact that Alpha ELF gas uses explicit relocs
and anything else suffers from bitrot.  I'd tried to enable them for the
target, but failed, cf. PR gas/11518.

Thanks.
        Rainer
Comment 4 Alan Modra 2023-01-12 11:40:57 UTC
Hmm, the top-level configure disables gas and ld for alpha-dec-osf since 1999.  alpha-linuxecoff prior to commit df26367c793c (ie. prior to 2.24) actually generated ELF.  Poking at this bug a little makes me think alpha-linuxecoff ought to be marked obsolete.
Comment 5 Alan Modra 2023-05-17 07:14:34 UTC
Reality is that the target is obsolete.