[U-Boot-Users] [PATCH 0/5][MIPS] Fix several problems on relocation

Shinya Kuribayashi skuribay at ruby.dti.ne.jp
Sat Oct 20 17:39:09 CEST 2007


I've pushed the following patchset on top of the upstream:

The following changes since commit 5441f61a3d8b7034f19fc1361183e936198e6dbb:
  Detlev Zundel (1):
        Fix two typos.

are available in the git repository at:

  git://www.denx.de/git/u-boot-mips.git testing

Shinya Kuribayashi (5):
      [MIPS] u-boot.lds: Remove duplicated .sdata section
      [MIPS] u-boot.lds: Fix __got_start and __got_end
      [MIPS] Fix $gp usage
      [MIPS] u-boot.lds: Define _gp in a standard manner
      [MIPS] Add PIC-related switches to PLATFORM_{CPP,LD}FLAGS and cleanup

 board/dbau1x00/u-boot.lds |   14 +++++++-------
 board/gth2/u-boot.lds     |   14 +++++++-------
 board/incaip/u-boot.lds   |   14 +++++++-------
 board/pb1x00/u-boot.lds   |   14 +++++++-------
 board/purple/u-boot.lds   |   14 +++++++-------
 board/tb0229/u-boot.lds   |   14 +++++++-------
 cpu/mips/config.mk        |    4 +---
 cpu/mips/start.S          |   19 +++++++++++++------
 examples/mips.lds         |   14 +++++++-------
 mips_config.mk            |   25 +++++++++++++++++++++++++
 10 files changed, 88 insertions(+), 58 deletions(-)


These patches mainly try to fix an outstanding mips bug:

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/25533
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/22160
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/19550
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/18887
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/14935

As already discussed, the cause of this bug is a misalignment between
__got_start and _GLOBAL_OFFSET_TABLE_. The __got_start misalignment
makes num_got_entries larger than needed. As a result, we update GOT
entries too many and corrupt top of the u_boot_cmd data. This will be
fixed by __got_{start,end} cleanups in linker scripts.

In addition to fixing above, I've takan $gp usage fix suggested by Vlad,
and cleaned up linker scripts, etc. Please review and give it a try.

thanks,

  Shinya





More information about the U-Boot mailing list