This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] FRV: weak symbols cannot be small-data


This problem caused a Linux kernel build failure.

Not regression checked, since I don't know how to run an FRV simulator,
or if such a thing exists at all.  Any hints would be appreciated.


Segher


2007-08-25  Segher Boessenkool  <segher@kernel.crashing.org>

	config/frv/frv.c (const_tree_decl): Don't use small-data for
	weak symbols.

---
 gcc/config/frv/frv.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 9c31b8b..469fd1b 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -9455,6 +9455,10 @@ frv_in_small_data_p (const_tree decl)
       return false;
     }
 
+  /* Do not use small-data for weak symbols.  */
+  if (DECL_WEAK (decl))
+    return false;
+
   size = int_size_in_bytes (TREE_TYPE (decl));
   if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
     return true;
-- 
1.5.2.2.g4d9b-dirty


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]