This is the mail archive of the binutils@sources.redhat.com 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: when an executable is loaded, it's address will be changed?


Ge Jun <gejun@iastate.edu> writes:

> An executable's code has already the absolute address(or the relative
> address in that section?) in it.  For
> example, the "nm" tool can list the address of the labels.
> 
> My question is, when the executable is loaded by linux, will the
> address be changed?

No, the address of an executable will not be changed.  (The address of
a shared library may--indeed, probably will--be changed when it is
loaded.)

In other words, it is not a requirement that the code in an executable
be position independent.

Ian


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