What's the difference between the relocatable link and the final link

Ian Lance Taylor iant@google.com
Wed May 16 14:45:00 GMT 2007


"redriver jiang" <jiangpeople@gmail.com> writes:

>    Recently I am porint the binutils to a new target. The new target
> utilize the EFL format. I've read the BFD  Internals several times,
> and find that I should write the rellocate function in ELF32-cpu.c.
> But I am confused by the "relocatable link " and "final Link". I think
> the relocate function in elf32-cpu.c is used by the final link, and
> the "special function" in howto structure is used by the relocatable
> link. Is this understanding correct?

No.  The relocate function is used by both.  The special function is
used by the assembler.  This is an ancient bug.  The special function
is also used when linking to a different format.

> And when the linker performs a relocatable link?

When you use the -r option.

Ian



More information about the Binutils mailing list