This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Difficulty in compiling(unsupported relocation against csrr0.)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Bradley Remedios <bremedios at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 15 Sep 2004 13:32:05 +0930
- Subject: Re: Difficulty in compiling(unsupported relocation against csrr0.)
- References: <963b3387040914133713b54c6c@mail.gmail.com>
On Tue, Sep 14, 2004 at 01:37:30PM -0700, Bradley Remedios wrote:
> The registers are say csrr0, csrr1, ccr0, dbcr0, etc...
gas does not have built-in support for these register names. If you
want to use them in your code, I suggest defining the values yourself,
eg.
csrr0 = 58
mtspr csrr0, r9
> I used to get the "unsupported relocation against rX" where X is a
> register number until I started to use the -mregnames switch.
Yes, because without -mregnames, identifiers such as "r9" I used above
are treated as undefined symbols. You'd need a special 6 bit reloc
for a particular register field in the instruction if we wanted to
delay register choice until linking.
> I get Unrecognized opcode iccci and dccci, but no other errors.
This is a bug, I suppose. You want -mbooke for the altivec support
on the 440EP, but as you've discovered..
> Also, using "-mbooke -m440" or "-m440 -mbooke" just causes the final
> one to be used.
We probably should have a -m440ep option.
--
Alan Modra
IBM OzLabs - Linux Technology Centre