[PATCH 3/3] MIPS: asm: add get_runtime_offset stub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



MIPS' relocation setup differs from ARM and RISC-V, but as it always
happen within assembly, we can assume C code to always be relocated,
which allows a trivial implementation of get_runtime_offset().

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 arch/mips/include/asm/reloc.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 arch/mips/include/asm/reloc.h

diff --git a/arch/mips/include/asm/reloc.h b/arch/mips/include/asm/reloc.h
new file mode 100644
index 000000000000..adffd6f1c7ef
--- /dev/null
+++ b/arch/mips/include/asm/reloc.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef _ASM_RELOC_H_
+#define _ASM_RELOC_H_
+
+static inline unsigned long get_runtime_offset(void)
+{
+	/* On MIPS, we always relocate before jumping into C */
+	return 0;
+}
+
+#include <asm-generic/reloc.h>
+
+#endif
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux