Skip to content

Fix several problems on relocation

Shinya Kuribayashi u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 of 5 patches 3 repliesIn review

4 of 5 patches are in this archive. The cover letter announces 5.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5u-boot.lds: Remove duplicated .sdata sectionboard/dbau1x00/u-boot.lds board/gth2/u-boot.lds board/incaip/u-boot.lds +4 more+0 -210 replies
2/5u-boot.lds: Fix __got_start and __got_endboard/dbau1x00/u-boot.lds board/gth2/u-boot.lds board/incaip/u-boot.lds +4 more+35 -210 replies
3/5Fix $gp usagecpu/mips/start.S+13 -60 replies
4/5u-boot.lds: Define _gp in a standard mannerboard/dbau1x00/u-boot.lds board/gth2/u-boot.lds board/incaip/u-boot.lds +4 more+14 -73 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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