dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0276-module-verifier-allow-limited-range-relocations-on-s.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
28f7f8
From: Vladimir Serbinenko <phcoder@gmail.com>
28f7f8
Date: Thu, 31 Dec 2015 18:30:39 +0100
28f7f8
Subject: [PATCH] module-verifier: allow limited-range relocations on sparc64.
28f7f8
28f7f8
clang as incomplete mcmodel=large support. As we don't currently need full
28f7f8
mcmodel=large support for sparc64, relax those checks.
28f7f8
---
28f7f8
 util/grub-module-verifier.c | 7 ++++++-
28f7f8
 1 file changed, 6 insertions(+), 1 deletion(-)
28f7f8
28f7f8
diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
28f7f8
index c027f0a0fb1..e217dcddc07 100644
28f7f8
--- a/util/grub-module-verifier.c
28f7f8
+++ b/util/grub-module-verifier.c
28f7f8
@@ -38,7 +38,12 @@ struct grub_module_verifier_arch archs[] = {
28f7f8
       R_SPARC_LO10,
28f7f8
       R_SPARC_64,
28f7f8
       R_SPARC_OLO10,
28f7f8
-      /* R_SPARC_32, R_SPARC_HI22  are supported but shouldn't be used because of their limited range.  */
28f7f8
+      /* Following 2 relocations have limited range but unfortunately
28f7f8
+	 clang generates them, as it doesn't implement mcmodel=large properly.
28f7f8
+	 At least our heap and core are under 4G, so it's not a problem
28f7f8
+	 usually. */
28f7f8
+      R_SPARC_HI22,
28f7f8
+      R_SPARC_32,
28f7f8
       -1
28f7f8
     } },
28f7f8
   { "ia64", 8, 0, EM_IA_64, GRUB_MODULE_VERIFY_SUPPORTS_RELA, (int[]){