Questions about a new port

Nick Clifton nickc@cambridge.redhat.com
Tue Dec 18 04:41:00 GMT 2001


Hi Reinhard,

> I would like to port bfd/gas/binutils for the Microtec PICs.
> This are 8 bit processors. I have searched on the net and in the
> binutils archives. I have also read the bfd documentation, but I
> couldn't find something like an HOWTO port binutils to a new
> target.

Correct.  There is no such document.

> I looked to the m68hc11 port, because it is an 8 bit processor. This
> port uses the elf format.  I thought to use the coff format

If you have a choice I would definitely recommend the ELF format.  It
is likely to be the most widely supported format in the future.

> I plan to port bfd then gas and then ld followed by binutils.
> Is this the right order?

Basically yes.  You should add in the OPCODES library after bfd and
before GAS, since this will be shared by both GAS and the disassembler
(OBJDUMP).  You may also want to consider porting GDB at some point.

> Which port is really a good starting point for me?

The m68hc11 port should be a good starting place.
 
> What are this relocations? I think this is used by the linker to
> link the object files and resolve the externals. Is this right?

Basically yes.  A relocation is a place where the assembler could not
generate the correct binary sequence.  (This is because at assembler
time there was not enough information to resolve the issue).
Relocations are recorded in the object file created the assembler and
then processed by the linker when it is creating an executable image.
(Note sometimes relocations are left in the executable image too, to
be resolved by the dynamic linker or the loader).

Cheers
        Nick



More information about the Binutils mailing list