This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] FRV: weak symbols cannot be small-data
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>, aldyh at redhat dot com, aoliva at redhat dot com
- Date: Sat, 8 Sep 2007 15:26:31 +0200
- Subject: [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