This is the mail archive of the 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: what's difference between "relocatable link" and "final link"?

Dear Ian, Nick, and Simon:

Thank you very much for your information provided, I can catch the
difference between these 2 kinds of link now. :-)
If I need more help from you, I will send you next time.

Best Regards

> -----Original Message-----
> From: Simon Richter []
> Sent: Monday, June 12, 2006 7:11 PM
> To: Huang, Chunhao
> Cc:
> Subject: Re: what's difference between "relocatable link" and "final
> Hello,
> Huang, Chunhao schrieb:
> > When I study the BFD library, I meet "relocatable link" and
> > "final link" several times, but I can NOT find out the difference
> > between them.
> Basically, after a "relocatable" link, you have an object file that is
> similar to the input files, that is, it consists of multiple (in most
> cases zero-based) code blocks (sections) along with relocation (i.e.
> what to change if you move the code to another address) and symbol
> how specific addresses are named) information. This format makes sense
> for further linking, but you would need a lot of postprocessing to
> actually get executable code. After a "final" link, the sections are
> concatenated into segments (this is what the loader cares about), and
> have absolute addresses in the virtual address space[1], and all
> have been resolved and replaced by either their numerical value, or by
> "dynamic symbol" if you have a (runtime) linker that supports shared
> libraries. After a final link, you can drop the symbol and relocation
> information at no harm, it is no longer needed (except for debugging).

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