How to control segments ?

Sterling Augustine sterling@tensilica.com
Wed Dec 3 17:12:00 GMT 2008


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.



More information about the Binutils mailing list