This is the mail archive of the binutils@sourceware.org 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: How to control segments ?


Dong Phuong wrote:

Could you please explain more details about this : "These long-call sequences are marked by a
relocation". I don't understand what is "marked by a
relocation".

"Relocation" is the process of connecting symbolic references to symbolic definitions. "A relocation" is a note to the linker describing a symbolic reference that the linker needs to resolve.


You can think about it (somewhat imprecisely) as a note to the linker that some pointer points to an object with an unknown address. When the linker figures out the object's address, it patches up the pointer with the correct value.

If all this is new to you, you might find these old, but still relevant articles helpful:

http://www.linuxjournal.com/article/6463
http://www.linuxjournal.com/node/1060/print

What the linker does when it encounters a particular relocation is up to you. It can simply fill in an address or it can modify the instruction itself.


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