This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Difficulty in compiling(unsupported relocation against csrr0.)


I've been having a lot of difficulty in trying to compile some
assembly code for the PowerPC 440 processor.  I am using binutils
2.15.91.0.2.  Any help would be appreciated.

My error is I get a lot of messages of "unsupported relocation against
X" where X is a register or symbol.

The registers are say csrr0, csrr1, ccr0, dbcr0, etc...
The symbols are _serial_initialized_text and _sdram_initialized_text
and are created and referenced within my source file.

The command that compiles the assembly file:
$ powerpc-linux-as -m440 -mregnames Start.s

I used to get the "unsupported relocation against rX" where X is a
register number until I started to use the -mregnames switch.

I have also confirmed that the 440EP does indeed have csrr0, csrr1,
... registers.

Code snippet:
_serial_intialized_text:
	.ascii "Serial Initialized" 

_sdram_intialized_text:
	.ascii "SDRAM Initializeds"

If I tell the assembler to use the booke instruction set (440 uses
booke instructions.) with the command:
$ powerpc-linux-as -mbooke -mregnames Start.s

I get Unrecognized opcode iccci and dccci, but no other errors.

Also, using "-mbooke -m440" or "-m440 -mbooke" just causes the final
one to be used.  I am pretty sure that I should be only using the
-m440 switch and not the -mbooke switch though.

Could someone please point me to what I am doing wrong?  Or some other
documents that will help me figure out what I am doing wrong?

Regards,
-- 
Bradley Remedios
bremedios@gmail.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]