summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2020-06-05 11:29:25 +0300
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2020-07-18 15:23:25 +0300
commitc37281310593c01981516bb706242f80295a1308 (patch)
treef120239d1c9ea31f7ea298d2e7f5a85d637e9c9a /arch/mips/include/asm
parenta02bc1f99275a17e1d29886c8c69398e9313842d (diff)
downloadu-boot-c37281310593c01981516bb706242f80295a1308.tar.xz
mips: reloc: Change R_MIPS_NONE to catch pre-reloc BSS usage
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>
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r--arch/mips/include/asm/relocs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/relocs.h b/arch/mips/include/asm/relocs.h
index 0987c4bb13..b9b0261f62 100644
--- a/arch/mips/include/asm/relocs.h
+++ b/arch/mips/include/asm/relocs.h
@@ -8,7 +8,7 @@
#ifndef __ASM_MIPS_RELOCS_H__
#define __ASM_MIPS_RELOCS_H__
-#define R_MIPS_NONE 0
+#define R_MIPS_NONE 0xbeef7531
#define R_MIPS_32 2
#define R_MIPS_26 4
#define R_MIPS_HI16 5