openrisc: fix relocation code
The relocation code can now relocate from anywhere to
the RAM.

The old code assumed that the binary was copied to the RAM
by some PBL and then it just relocated the .text section
from the loaded address to the linked address.

Now, it first checks if vectors are somewhere else than the
linked address. If yes, there are copied to address 0 (or
to the exception vector base address if register EVBAR is
present).

Then, the .text section is relocated from its current location
to the RAM.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 9ac710c commit 7911f5efdd039ac79902a636811b1cc1693a0941
@Franck Jullien Franck Jullien authored on 21 May 2014
Sascha Hauer committed on 22 May 2014
Showing 1 changed file
View
arch/openrisc/cpu/start.S