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]

Re: Add new ISA to the binutils!


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


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