u-boot-brain/cpu/mips
Shinya Kuribayashi 22069215eb [MIPS] Fix $gp usage
Now we load $gp with _GLOBAL_OFFSET_TABLE_, but this is incorrect use.
As a general principle, we should use _gp for $gp.

Thanks to linker script's help we fortunately have _gp which equals to
_GLOBAL_OFFSET_TABLE_. But once _gp gets out of alignment, we will not
be able to access to GOT entires, global variables and procedure entry
points. The right thing to do is to use _gp.

This patch also introduce a new symbol `.gpword _GLOBAL_OFFSET_TABLE_'
which holds the offset from _gp. When updating GOT entries, we use this
offset and _gp to calculate the final _GLOBAL_OFFSET_TABLE_.

This patch is originally submitted by Vlad Lungu <vlad@comsys.ro>, then
I made some change to leave over num_got_entries.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Cc: Vlad Lungu <vlad@comsys.ro>
2007-10-21 10:55:36 +09:00
..
asc_serial.c * Patch by Steven Scholz, 10 Oct 2003 2003-10-09 20:09:04 +00:00
asc_serial.h * Patch by Steven Scholz, 10 Oct 2003 2003-10-09 20:09:04 +00:00
au1x00_eth.c cpu/m*: Remove obsolete references to CONFIG_COMMANDS 2007-07-09 19:06:00 -05:00
au1x00_serial.c Fix au1x00_serial baud rate calculation: 2005-09-25 16:50:33 +02:00
au1x00_usb_ohci.c Add support for AMD's Pb1x00 eval board; 2005-09-25 00:53:22 +02:00
au1x00_usb_ohci.h Add support for AMD's Pb1x00 eval board; 2005-09-25 00:53:22 +02:00
cache.S * Patch by Steven Scholz, 10 Oct 2003 2003-10-09 20:09:04 +00:00
config.mk Fix MIPS LE build problem 2006-07-21 11:24:47 +02:00
cpu.c * Patch by liang a lei, 9 Jan 2004: 2004-02-07 01:27:10 +00:00
incaip_clock.c Code cleanup, especially MIPS for GCC 4.x 2005-12-04 00:40:34 +01:00
incaip_wdt.S * Code cleanup: 2003-06-27 21:31:46 +00:00
interrupts.c * Code cleanup: 2003-06-27 21:31:46 +00:00
Makefile Move "ar" flags to config.mk to allow for silent "make -s" 2006-10-09 01:02:05 +02:00
start.S [MIPS] Fix $gp usage 2007-10-21 10:55:36 +09:00