Link address is the address where execution of a program takes place
No, it's not.
while load address is the address in memory where the program is actually placed.
Kind of. The program usually consists of more than one instruction, so it can't be placed at a single "load address".
When people talk about load address, they usually talk about relocatable code that can be relocated (at runtime) to an arbitrary load address.
For example, let's take a program that is linked at address 0x20020
, and consists of 100 4-byte instructions, which all execute sequentially (e.g. it's a sequence of ADD
s followed by a single SYSCALL
to exit the pogram).
If such a program is loaded at address 0x20020
, then at runtime the program counter will have value 0x20020
, then it will advance to the next instruction at 0x20024
, then to 0x20028
, etc. until it reaches the last instruction of the program at 0x201ac
.
But if that program is loaded at address 0x80020020
(i.e. if the program is relocated by 0x80000000
from its linked-at address), then the program counter will start at 0x80020020
, and the last instruction will be at 0x800201ac
.
Note that on many OSes executables are not relocatable and thus have to always be loaded at the same address they were linked at (i.e. with relocation 0
; in this case "link address" really is the address where execution starts), while shared libraries are almost always relocatable and are often linked at address 0
and have non-zero relocation.