This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Porting BFD to new architecture
On Wed, 2005-10-12 at 18:02 +0800, ibanez@sunplus.com wrote:
>
>
>
>
> We are porting libbfd to a new architecture.
> But the libbfd internal is highly architecture dependent which
> is very different with other tools.
>
> For example, to port gas to a new target, all we need to do
> is add some target related files, add a few lines to the config file
> and rebuild it.
>
> But to port bfd, we need to hack the bfd source code.
> It makes upgrade to a new libbfd version impossible without re-porting.
>
> How can we add our architecture to the libbfd in a smart and transparent
> way?
>
This is kind of a strange question. I mean if it's a totally new
architecture, it's a totally new CPU - in that case I know for certain
you must do a lot more with GAS. Likewise if it was a brand new
architecture, you could model your binary format from a preexisting one
like aout or elf. I handle binutils on m68kmint and we use a bfd format
that is a hacked up aout format. Very little work needed to be done to
upgrade between versions, but you're not going to get away clean without
doing anything ever ;)
Thanks,
Mark