aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorAndreas Fischer <a_fisch@gmx.de>2004-11-27 22:51:43 +0000
committerAlan Modra <amodra@gcc.gnu.org>2004-11-28 09:21:43 +1030
commit7482ad259b15635788b1069dcfc6c8dca402f922 (patch)
treed60ce0bb36736566c8201f526b77601568623f11 /gcc/config
parentf57fe06890a3f6072b1d993432cbee19bd7e7e21 (diff)
downloadgcc-7482ad259b15635788b1069dcfc6c8dca402f922.zip
gcc-7482ad259b15635788b1069dcfc6c8dca402f922.tar.gz
gcc-7482ad259b15635788b1069dcfc6c8dca402f922.tar.bz2
re PR target/16343 (invalid code when using -meabi -msdata=eabi)
PR target/16343 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Disallow functions, strings and thread-local vars. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r91397
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/rs6000/rs6000.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 5a7bd84..ca919b3 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -17263,6 +17263,18 @@ rs6000_elf_in_small_data_p (tree decl)
if (rs6000_sdata == SDATA_NONE)
return false;
+ /* We want to merge strings, so we never consider them small data. */
+ if (TREE_CODE (decl) == STRING_CST)
+ return false;
+
+ /* Functions are never in the small data area. */
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ return false;
+
+ /* Thread-local vars can't go in the small data area. */
+ if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
+ return false;
+
if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl))
{
const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));