This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Porting to a target similar to an existing one
- From: Nick Clifton <nickc at redhat dot com>
- To: Bernd Jendrissek <berndj at prism dot co dot za>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 05 May 2004 17:18:44 +0100
- Subject: Re: Porting to a target similar to an existing one
- References: <20040430103820.GA1430@prism.co.za>
Hi Bernd,
[Sorry for the delay in replying to this email].
What do you guys recommend? Should I just go for a brand new target,
effectively forking the v850 code, or should I litter the v850 code with
flags and ifdefs and other uglification? The different relocation
flavour seems to suggest quite a deep schism...
I would suggest a new target with a new manufacturer field (the middle
field). eg something like this:
--target=v850-greenhills-elf
I would also suggest that you arrange for v850-elf and v850-gnu-elf to
be aliases for v850-unknown-elf.
Note - if you find that there is lots of common code between the "Green
Hills" target and the GNU one, there is no reason why you should not
extract this code into a shared file.
Oh, and BTW, is there anywhere I can lookup what the relocations are
supposed to do, besides guessing based on their name?
The meaning of the relocations really ought to be defined by the EABI in
use. Therefore you should check the Green Hills documentation to see
what EABI they follow and attempt to find the documentation on that. It
may well be that there is no properly defined EABI, which is why there
are differences between the Green Hills and GNU compilers. You can
always check the source code for the implementation of the GNU versions
of the relocs, but I doubt if Green Hills will be willing to let you
look at their code...
Cheers
Nick