This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Add new ISA to the binutils!
- From: libra <mr924352 at cs dot nthu dot edu dot tw>
- To: binutils at sources dot redhat dot com
- Date: Mon, 5 Apr 2004 09:38:12 +0800
- Subject: Re: Add new ISA to the binutils!
At first,thanks for your reply.
I am a little confused about disassembler.
Why i must implement it?
I found some files (ex:like ld/emulparams/armelf.sh ld/emultempl/armelf.em) in
the ld directory.
I think that i must also add new files like above for my new ISA in the ld
directory,is that right?
My idea is that because the linker(ld) is the part of the GNU toolchains,i
must implement a new linker for my new ISA.
Therfore,i must add(or modify) some files in the ld directory.
thanks a lot!!!
> libra <mr924352@cs.nthu.edu.tw> writes:
>
> > I am trying to add the new target (ISA Instruction Set Architecture) to
the
> > binutils.Now,i have some ideas to do so,maybe not right.
> >
> > I must add the new ISA in the bfd directory(ex:like coff-arm.c cpu-arm.c)
> > in order to get the right object file format (elf)
>
> Yes. For ELF you would add files like cpu-XXX.c and elfNN-XXX.c.
>
> > Then i also add the new ISA in the gas/config directory (ex:like tc-arm.c)
> > in order to provide the new assembler to this new ISA,and add the new ISA
in
> > the ld directory.
>
> Yes.
>
> Typically you also add files in the opcodes directory for the
> disassembler, and for an opcode table shared by the assembler and the
> disassembler.
>
> > I think to port a new ISA to binutils must be difficult.
>
> It's not too bad. You start by looking at the support for a CPU
> similar to yours. Typically the hardest part is writing the opcodes
> table, and that is not difficult, merely tedious. Of course if your
> CPU has unusual features then those must be handled somehow.
>
> > My question is that who have the experience to port a new ISA(target) to
the
> > binutils,
> > and can tell me the detail.
>
> A number of people on this list. And don't forget to read the
> internals documentation in bfd/doc/bfdint.texi and
> gas/doc/internals.texi.
>
> There are also a number of companies who will do this kind of work for
> pay, including my own employer.
>
> Ian