public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH] mips: reloc: Change R_MIPS_NONE to catch pre-reloc BSS usage
Date: Fri, 5 Jun 2020 17:51:42 +0200	[thread overview]
Message-ID: <82176ea9-1d84-0216-b103-e0e6c83cff8e@gmail.com> (raw)
In-Reply-To: <20200605082925.4559-1-sr@denx.de>



Am 05.06.20 um 10:29 schrieb Stefan Roese:
> This patch changes the R_MIPS_NONE define from 0 to a magic value. This
> makes it possible to better detect any forbidden pre-relocation usage
> of BSS variables, as they are often zero'ed and then relocation is
> stopped too early.
> 
> Additionally the error message is improved to also print the faulting
> address. This helps finding the root-cause for this breakage by
> comparing this address with the values in System.map.
> 
> This patch helps a lot when working on pre-relocation code, like the
> Octeon DDR init code, where such variables have hit me multiple times
> now.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> Cc: Aaron Williams <awilliams@marvell.com>
> Cc: Chandrakala Chavva <cchavva@marvell.com>
> ---
>  arch/mips/include/asm/relocs.h | 2 +-
>  arch/mips/lib/reloc.c          | 7 ++++---
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 

applied to u-boot-mips/next, thanks.

BTW: in case the relocation table is cutted off, you can increase the
size with CONFIG_MIPS_RELOCATION_TABLE_SIZE.

-- 
- Daniel

  reply	other threads:[~2020-06-05 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05  8:29 [PATCH] mips: reloc: Change R_MIPS_NONE to catch pre-reloc BSS usage Stefan Roese
2020-06-05 15:51 ` Daniel Schwierzeck [this message]
2020-06-06  4:46   ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82176ea9-1d84-0216-b103-e0e6c83cff8e@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox