Bug 11517 - Fatal error assembling ldgp for Alpha ECOFF
Summary: Fatal error assembling ldgp 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:03 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
Make GPDISP relocs non-PC-relative (373 bytes, patch)
2010-04-20 14:33 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:03:34 UTC
The following trivial testcase fails to assemble:

$ cat ldgp.s
        ldgp $29,0($27)
$ gas -o ldgp.o ldgp.s
ldgp.s: Assembler messages:
ldgp.s:1: Fatal error: internal error? cannot generate
`BFD_RELOC_ALPHA_GPDISP_HI16' relocation
Comment 1 Nick Clifton 2010-04-20 14:33:38 UTC
Created attachment 4736 [details]
Make GPDISP relocs non-PC-relative
Comment 2 Nick Clifton 2010-04-20 14:34:28 UTC
Hi Rainer,

  The uploaded patch fixes this problem for me, but since I no expert on this
particular architecture I am not sure if it is the right solution.  What do you
think ?

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

Hi Nick,

>   The uploaded patch fixes this problem for me, but since I no expert on this
> particular architecture I am not sure if it is the right solution.  What do you
> think ?

the object files produced by gas and as differ for my testcase:

$ objdump -dr ldgp.o
[...]
Disassembly of section .text:

0000000000000000 <.text>:
   0:   00 00 bb 27     ldah    gp,0(t12)
                        0: GPDISP       *ABS*+0x4
   4:   04 00 bd 23     lda     gp,4(gp)
                        4: IGNORE       *ABS*+0x8000
   8:   1f 04 ff 47     nop
   c:   00 00 fe 2f     unop
$ objdump -dr ldgp.as.o
[...]
Disassembly of section .text:

0000000000000000 <.text>:
   0:   01 00 bb 27     ldah    gp,1(t12)
                        0: GPDISP       *ABS*+0x4
   4:   10 80 bd 23     lda     gp,-32752(gp)
   8:   00 00 fe 2f     unop
   c:   1f 04 ff 47     nop

I'd probably have to either study the architecture manual, or (far
simpler since it doesn't require my time) try a gcc bootstrap once gas
is again able to assemble gcc output.  This is generally an excellent
test.

	Rainer
Comment 4 Alan Modra 2023-05-17 07:14:26 UTC
Target is obsolete